12-12-2007, 12:16 AM
|
#1 (permalink)
|
|
Super Moderator
Join Date: Sep 2007
Posts: 165
Thanks: 0
|
Majorly Advanced Regex
Looking for some clever clogs to figure out something for me:
Currently the strip_tags php function is rather rubbish, and simple folk must of wrote it! Well it doesn't check for the angle bracket within tag attributes.
So for example you have the html code:
Code:
<a onclick="javascript.writeln(\">these angl>>>>>>e brackets are smelly');">Boo Boo</a>
and you run it via strip_tags, PHP will return '>>>>>e brackets are smelly');">Boo Boo'
What i am requesting is some regex that will handle it as it should returning 'Boo Boo', i've been fiddling with lookaheads, behinds and arounds and just can't get it to match the whole tag!
|
|
|
|