"Rodrigo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello. I wrote a comments application that allows the use of some HTML
> tags for text formatting (<i><b>). I ran into a problem of users not
> closing the tags (</i></b>), so when I display a page with all the
> comments, if the user did not close the <b> tag then all the text in the
> other comments is bold.
>
> Is there a solution to this?
I'd just check for open tags on form submit, and then bitch and moan about
it if there are any... (e.g. leave it up to the user...)
With a good contains_open_tags() function you'll also be able to accept more
tags like TABLE and DIV (with some attribute filtering) since their (more or
less) unlikely to cause trouble as long as their properly closed...
--
Lasse
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]