HTML Entities
I've come across a problem when dealing with displaying and formatting HTML. To avoid formatting problems, I'll just post a text file on my website with the examples. The goal is to disallow all HTML, and then allow some.
http://www.kriona.net/dml/htmlentities.txt
What do you guys think of this method? There a better way to do it? It is kinda memory-intensive, but if it's only done when HTML is posted and not viewed, it's not much of a problem. I would rather have a list of tags one can use rather than a list of tags one can't use, which is why I do it this way. This also keeps JavaScript out of the HTML.
http://www.kriona.net/dml/htmlentities.txt
What do you guys think of this method? There a better way to do it? It is kinda memory-intensive, but if it's only done when HTML is posted and not viewed, it's not much of a problem. I would rather have a list of tags one can use rather than a list of tags one can't use, which is why I do it this way. This also keeps JavaScript out of the HTML.
