I just added a WYSIWYG editor on my website so my users can format their content any way they want. The editor works fine and is successfully saving the html coded content on the database.
The problem is when I try to view the content, here's what it shows on the webpage:
<span style="font-family: Impact;">This is just a test ad only.</span><br><span style="text-decoration: line-through;">This is just a test ad only.</span><br><h3>This is just a test ad only.</h3>This is just a test ad only.<br><br><br><br>
The html formats do not work.
The php code to display the content is:
<?php echo nl2br(preg_replace("/\[URL\](.*)\[\/URL\]/iU", "<a href=\"\\1\" target=\"_blank\">\\1</a>$link_append", $ad['addesc'])); ?>
Can you please help me correct this code so the html coded text is displayed properly? Or, is there another way to do this?