need toi

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a wysiwig textarea editor, something like this one, I want to
update my text, the content is retrieved from database and inserted
into this textarea through a javascript function, the first arguemnt
passed, which is the data from database, contents additional new
lines, so this causes a javascript error,

I have tried these:

$des  = mysql_result($select2 , 0 , 'des');

$des = stripslashes($des);
$des = html_entity_decode($des);
$des = str_replace("\n", " ", $des) ;
$des = preg_replace("/\r?\n/", "", $des);

I still see new lines after divs, uls, ols, li(s) lists
Help appreciated

Re: need toi

itpvision schreef:
Quoted text here. Click to load it


Why dont you add:
$des = throwKitchenSink($des,"60 kilograms");

Quoted text here. Click to load it

What is it you want to achieve?

Why are you calling stripslashes, then html_entity_decode, then replace
\n by space?

if you first replace \n by space, how can the next regex EVER fit \r?\n ???
You just made sure no \n is in the content.

It is all very vague.
Also, you didn't tell us what come out of your query. Was it original
content? Did you change the content? (You ARE calling html_entity_decode
for some reason I expect)

Why don't you ask what it is you need *excactly*, then we can maybe help.

Erwin Moller

Re: need toi

Greetings, itpvision.
In reply to Your message dated Tuesday, May 27, 2008, 18:09:27,

Quoted text here. Click to load it

Mmmm.... sorry to say that, but you MUST NOT ask this question in
alt.html.tags (where it must be asked).
The case is simple - you'll be most likely kicked in your lazy ass,  because
you didn't read anything about these HTML tags.
Go ahead and start reading HTML specs.


Site Timeline