Does anyone know of a prebuilt script to check for closing tags?
I allow users to use <b>, <img>, <pre>, etc in my forums. I would like to have a script check to see if there are any open tags in the message string, and spit out the appropriate end tag. Considering that <pre>, < pre> <style=font-weight:bold pre>, etc are all valid forms of <pre>, it's going to require a whole mess of regex to create a reliable system.
I'm sure something like this exists, considering that vBulletin and phpbb both do it. However, I cannot find anything. Does anyone of a prebuilt script for this?
The Q&D method would be to just put </b></a></pre>...etc at the end of each post, but I would rather not do that.
Thanks in advance.