I use htmlspecialchars function in my string. But, I don't want to clean them;
<b>, <br>, <p> <ul>,<li> bla bla...
Example: Mystring = "<script>.....</script><br><b>test</b><p>aaaa</p>";
I want to; =
.....I use htmlspecialchars function in my string. But, I don't want to clean them;
<b>, <br>, <p> <ul>,<li> bla bla...
Example: Mystring = "<script>.....</script><br><b>test</b><p>aaaa</p>";
I want to; =
.....Have a look at HTML Purifier, and especially the whitelist feature.
This is probably the safest approach if you allow HTML tags. You can view the comparison here.
You can use HTML Sanitizer Class - http://www.phpclasses.org/browse/package/3746.html