Well, since I'm such a bastard about this sort of thing, I'd probably just run the submitted html through a validator and complain loudly if it's not perfect. A less draconian measure, though, would be to pipe it through HTML Tidy or something.
(I thought I saw something like this on CPAN, but I might have been dreaming. Or drunk. :)
In reply to Re: Unbalanced Tags
by eg
in thread Unbalanced Tags
by lzcd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |