|
|
 |
RE: FN-FORUM: Function to strip out HTML from data
date posted 8th October 2007 15:27
Quoting "Ben Johnson (Neogic) F" [EMAIL REMOVED]
> Dave wrote:
>> All of those links go to articles that recommend using regular
>> expressions to strip the tags. And they all seem to be using
>> regular expressions that break on the most trivial of HTML.
>>
>> " />
>>
>> Surely there's a better approach in ASP.
>
>
> I bumped up against this recently - as you mentioned, the problem is lack =
of
> contextual matching within regular expressions, which would allow us to
> distinguish between a tag "" and brackets within tag attributes
> (" b) alert()'>").
>
> I came up with a harder to break Reg Exp, but it's still not perfect:
>
> =09/(? |
|