Jump to content

[SOLVED] Need Help Displaying Comments


limitphp

Recommended Posts

On my site, I want people to be able to leave comments.

I want the comments to show when they skip a line (hit enter), like this:

test

 

test2

 

But I also want to protect the comments from showing html. 

so if someone puts:

<b>test</b>

 

<b>test2</b>

 

it will skip the lines, but it will expose the html and not bold the text....

 

How would I do that?

Currently, I use:

$value = htmlspecialchars($value, ENT_QUOTES);

to protect against html, but that takes away the ability to have their comments skip lines.

Link to comment
https://forums.phpfreaks.com/topic/144115-solved-need-help-displaying-comments/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.