I was a little unfair, it seems pretty good. Reminds me of htmlpurifier very much in the way it does things. I like your whitelists and list of allowed tags. Here are a couple of points
Good points
-Nice whitelists
-Good tags/attribute lists
-Well organised code
Bad points
-Auto decodes e.g. <a href="%22" becomes <a href="""
-You use mbstring http://www.securityfocus.com/bid/32948
-Your CSS text checker is very weak, looking for "alert" won't help anyone
Here is the bypass:-
<div style="-ms-behaviour:x">
IE8 supports -ms-behaviour too
------------------------------------------------------------------------------------------------------------
"People who say it cannot be done should not interrupt those who are doing it.";
labs : [
www.businessinfo.co.uk]
blog : [
www.thespanner.co.uk]
Hackvertor : [
hackvertor.co.uk]
Edited 1 time(s). Last edit at 02/08/2010 03:50AM by Gareth Heyes.