Hi all,
I'm having a little problem with FCKeditor in a PHP envoierment. I always get "rn" or "\r\n" returned.
This is what I'm using:
1. Before the form is sended to the database, it gets cleaned with mysql_real_escape_string:
2. When not all fields are ready to being sended (e.g. one or more input fields are left blank), the user will get the form back. First, the input- and textarea fields are going trough this function:
Now I have the problem that if I posted HTML into the editor, It returns many "rn" into the text.
I'm using FCKeditor version 2.6.3.
In fckconfig.js I have set this:
magic_quotes in php.ini are set to off.
But I'm still getting inundated with rn's.
What can I do?
Many thanks and all the best for 2009,
Kris
I'm having a little problem with FCKeditor in a PHP envoierment. I always get "rn" or "\r\n" returned.
This is what I'm using:
1. Before the form is sended to the database, it gets cleaned with mysql_real_escape_string:
function cleaninput($value) { if(get_magic_quotes_gpc() == 1) { $value = stripslashes($value); $value = mysql_real_escape_string($value); } else { $value = mysql_real_escape_string($value); } return $value; }
2. When not all fields are ready to being sended (e.g. one or more input fields are left blank), the user will get the form back. First, the input- and textarea fields are going trough this function:
function cleanedit($value) { $value = htmlentities($value); $value = stripslashes($value); return $value; }
Now I have the problem that if I posted HTML into the editor, It returns many "rn" into the text.
I'm using FCKeditor version 2.6.3.
In fckconfig.js I have set this:
FCKConfig.EnterMode = 'p' ; // p | div | br FCKConfig.ShiftEnterMode = 'br' ; // p | div | br FCKConfig.FormatOutput = false ;
magic_quotes in php.ini are set to off.
But I'm still getting inundated with rn's.
What can I do?
Many thanks and all the best for 2009,
Kris
Re: Problem with "rn" and "\r\n" with HTML i
Re: Problem with "rn" and "\r\n" with HTML i
hmm yes I see.
Thanks for the answer, thats working now