L
lawrence
I'm worried about a user typing something like this:
"Hi, my name is <b>Super Guy and I'm so smart"
That is, I'm worried about the unclosed <b> tag. This is a constant
risk on a site like www.monkeyclaus.org, which has 5 to 20 new
comments posted each day.
My first thought was to simply add in a lot of closing tags after
every comment. After all, the software running the site could very
easily put in something like this:
</i></b></ul></ol>
plus a few more as I think of them.
Sadly, the graphic designers I work with tell me that this will not
validate.
So then I attempted to write code that would automatically close open
tags. This is really not as easy as it seems. It isn't enough to look
for this:
<i>
Because someone might write:
<i id="linkToMe">
But I can't just do a simple search for :
<i
because that might also be
<iframe>
So I've given up trying to write an automatic tag closer. I'm leaning
towards the excessive close tags, even though they don't validate, but
I was hoping someone on this group might have suggestions about better
ways to handle this.
"Hi, my name is <b>Super Guy and I'm so smart"
That is, I'm worried about the unclosed <b> tag. This is a constant
risk on a site like www.monkeyclaus.org, which has 5 to 20 new
comments posted each day.
My first thought was to simply add in a lot of closing tags after
every comment. After all, the software running the site could very
easily put in something like this:
</i></b></ul></ol>
plus a few more as I think of them.
Sadly, the graphic designers I work with tell me that this will not
validate.
So then I attempted to write code that would automatically close open
tags. This is really not as easy as it seems. It isn't enough to look
for this:
<i>
Because someone might write:
<i id="linkToMe">
But I can't just do a simple search for :
<i
because that might also be
<iframe>
So I've given up trying to write an automatic tag closer. I'm leaning
towards the excessive close tags, even though they don't validate, but
I was hoping someone on this group might have suggestions about better
ways to handle this.