I ~guess~ this non-regular expression may work:
sPost = Request.Form("TheTextArea")
sPost = Replace(sPost, "<", "<")
sPost = Replace(sPost, "<b>", "<b>")
sPost = Replace(sPost, "</b>", "</b>")
sPost = Replace(sPost, "<i>", "<i>")
sPost = Replace(sPost, "</i>", "</i>")
sPost = Replace(sPost, "<img", "<img")
sPost = Replace(sPost, "<font", "<font")
sPost = Replace(sPost, "</font>", "</font>")
If I got that right, it'll replace all the <'s with <'s, and then go back
and re-replace the <b, <i, <img, <font and they're closing equivalents.
This will still leave > everywhere, but that shouldn't matter. I'm sure
there is a more robust solution out there, anyway.
Ray at work
"Lasse Edsvik" <la***@nospam.com> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
Hello
I was wondering if you guys could help me. im building a small
messageboard and i want to filter all html-tags except these ones:
<b> <i> <img.........> <font....>
how to build such a reg exp pattern?
TIA
/Lasse