dtnbjjq51949 2013-05-17 05:56 采纳率: 0%
浏览 22

如何同时启用linebreak,mysql_escape_string和htmlentities?

I am creating something like a facebook wall (post commenting system)

 mysql_real_escape_string(htmlentities($_POST['wallcomment']));

I store the result return by the above code in the tables, when i tried to display i out, i can display html code like 'test'

However, when i have linkbreak, it convert to etc. I am posting via a textarea.

How do i enable htmlentities and mysql_real_escape_string, while still catering the linkbreak..

Thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?