Jump to content

Fostav

New Members
  • Posts

    2
  • Joined

  • Last visited

Fostav's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am using a ready script, which includes account registration and a few functions. Users can edit a text area on their profile which is saved on a database, is a description for something. Editing the template of my script/web i would like to make it, when a user writes for example: One Two Three to be displayed like this also cause right now its like One Two Three I'made a re-search on the file's and found out the followings: $description_prepare = str_replace(array("\r\n", "\n", "\r"), ' ', $FORM['description']); $TMPL['description'] = $DB->escape($description_prepare, 1); $TMPL['description'] = $this->bad_words($TMPL['description']); $TMPL['description'] = preg_replace('/[^A-Za-z0-9 .,\-]/', '', $TMPL['description']); as you can see the script is replacing the line breaks with a space ' '. i removed this part completely and made it like $TMPL['description'] = $DB->escape($FORM['description'], 1); $TMPL['description'] = $this->bad_words($TMPL['description']); $TMPL['description'] = preg_replace('/[^A-Za-z0-9 .,\-]/', '', $TMPL['description']); but now when i am editing the description for example from One Two Three to One Two Three i am getting back Onern Two Three How can i solve this? Any idea? Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.