So normally I am not a big fan of text editors, but I am making some forums for a client and I am having a huge issue with it.
I did not have this issue in Xampp but now that it is live it's going to have a ton of issues.
Instead of wrapping the inserted text with <p></p>
as it does in Xampp it simply inserts plain text with \r\n
in place of <br />
at first I thought it was the way it was set up, but I changed it to not force <p>
but to force <br />
. Not the issue.
I have the following line of code now to try to fix the issue and just convert it to normal line breaks but it is not working.
$string = nl2br(html_entity_decode(htmlentities($topic_info['topic_message'], ENT_QUOTES, 'UTF-8')));
I have tried several different variations, and have tried just nl2br
by itself without all the other mess, but nothing it is still showing \r\n
instead, he is a sample line.
why arent you flippin working\r\njebus
how can I either fix it to show the line without the \r\n
or how can I fix it to actually insert the text from the text editor right.
` and `nl2br` isn't working to fix it – kira423 Dec 16 '12 at 08:19