X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=inc%2Fhtmlparse.inc;h=5eebd3b4dceb47757d56960829dfc0b1d11b63a3;hb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;hp=e54c584f7886a9f0b536391d8b2640b7a6a8aa65;hpb=bc13d5d6e1834068f8b690c32bba114e352dacdd;p=mirrors%2FKyberia-bloodline.git diff --git a/inc/htmlparse.inc b/inc/htmlparse.inc index e54c584..5eebd3b 100644 --- a/inc/htmlparse.inc +++ b/inc/htmlparse.inc @@ -1,4 +1,10 @@ 1, // fix later ;) 'li'=>1, 'hr'=>1, + '/tr'=>1, 'img'=>1, 'p'=>1 ); @@ -38,7 +45,8 @@ function htmlparse($data) 'ol'=>1, 'li'=>1, 'tt'=>1, - 'code'=>1, + 'address'=>1, + 'code'=>1, 'small'=>1, 'big'=>1, 'caption'=>1, @@ -124,10 +132,17 @@ function htmlparse($data) $htmlparse = 'JavaScript je na hovno!'; //$htmlparse = 'JavaScript sux!'; return 0; + elseif(Ereg('/on',' '.$attrib[1])): // temporary solution for pernament problem...and it isn suicide + $htmlparse = 'z bezpecnostnych dovodov nieje povolene vkladat do tagov retazec "/on"'; + return 0; + + +/* elseif(Ereg(' style',' '.$attrib[1])): // styles are forbidden - don look at me THAT way ;) $htmlparse = 'Ten "style" se mi tam nezda!'; //$htmlparse = '"styles" are forbidden!'; return 0; +*/ elseif(Ereg('://',' '.$attrib[1]) && $attrib[0] != "img" && $attrib[0] != "a"): // adresses in attributes (except A and IMG tags) are forbidden $htmlparse = 'Neco se mi tam nelibi! To je hlaska HTML validace - nejedna se o nejakou cenzuru ;)'; //$htmlparse = 'Forbidden usage of adresses in tags!';