Posted by G0ng on 10/24/05 12:26
Hello, I have the following problem.
I have a Mysql db field which holds an html code (e.g. <p
style="text-decoration: underline;">lala</p>).
To insert this code I use the ricEdit javascript controll with which you
create a textarea and format the text. When I submit the value it is
stored in the db.
I want to be able to edit this code (from a web form) so I want to
retrive the code and pass it to the javascript control. I get it to a
var like: $line["text"].
If I do <input type="text" value="<?php echo $line["text"];?>"> there is
a problem with the " in the html code. I trie to do a
addslashes($line...) but what I get is something like:
original: <p style="text-decoration: underline;">lala</p>
addslashed: <p style=\"text-decoration: underline\>lala</p> (last " is
ommited")
so everything is messed. I also tried str_replace('"','\\"',$line[]) but
the same thing happens.
Is there a problem with ;" ??? How can I overcome it?
Navigation:
[Reply to this message]
|