using ckeditor to display image on a web page , adds extra double quotes and slashes in the image source
I am using ckeditor on a textarea, the html source code of the text enter开发者_运维百科ed in the textarea is saved in the database, but for an image, the src is added with extra double quotes....this stops the image from being visible on the page...what to do please help. I am using :
mysql_real_escape_string($TextAreaSourceCode);
Please help, how to remove the extra quotes added in the img src element.
Just do the backward replacing before output.
$text = str_replace('\n"', '"', $text);
Look what other you should replace on the mysql_real_escape_string documentation page
UPD: mysql_real_escape_string replaces all dangerous (in meaning of SQL-injections) characters in value. For example, replaces " on \" and so on. For full list look documentation on the function. Don't know why it's adding extra quotes, but probably the problem is in this replacement.
Maybe if you provide us with example of input and result I could tell you more
精彩评论