Whether text of paragraph is input and <br> tag will be remove after real_escape_string, how do I whitelist the break tag?
views:
37answers:
3
A:
use strip_tag instead. The second parameter is an array of allowed tags
php.net/strip_tags
MANCHUCK
2010-06-04 13:48:42
A:
I manage to use alternative method, nl2br then mysql_real_escape_string and finally use str_replace to allow <br> tag
proyb2
2010-06-04 14:12:03
A:
Is real_escape_string() a user defined function or are you referring to mysql_real_escape_string?
Because mysql_real_escape_string() will escape " to \" but will leave
<br> alone.
Bob Fanger
2010-06-05 11:27:04