> You need to get better tools.  I found this with Notepad++ for Windows
> searching "case" within *.php files filter within the root directory
> of the extracted zip/tarball:
> H:\data\Downloads\dev\PHP\htmlpurifier-4.4.0\library\HTMLPurifier\AttrDef\CSS\Font.php
> (6 hits)
>       Line 45:         $lowercase_string = strtolower($string);
>       Line 46:         if (isset($system_fonts[$lowercase_string])) {
>       Line 47:             return $lowercase_string;
>       Line 61:                 case 0:
>       Line 77:                 case 1:
>       Line 131:                 case 2:
> Haven't looked at the entire file or source code but that looks close
> enough to me... ;)

Thanks a lot for taking a look Tommy,

I do have a decent text editor I use to code with... and had searched for 
possible places where is the culprit strtolower() ... and so far no matter 
which instances(s) I comment out, I cannot seem to turn off the behavior of the 
library as a whole (either of them, or both) which is forcing the input CSS to 

For example, I also just tried the exact place you suggested: this one:


...and changed line 45 to this:

        //$lowercase_string = strtolower($string);//Govinda hack
        $lowercase_string = $string;

but still no luck.

>> Have you tried http://htmlpurifier.org/phorum/ and did you noticed
>> "Since the project has been suspended, please only contact me if you
>> intend to continue maintaining it." for CSSTidy?

I hadn't posted on http://htmlpurifier.org/phorum because last time I did that 
when I has also posted on stackoverlfow (SO), then the developer of 
HTMLpurifier scolded me for the dupe ;-) ..  and he has already posted a 
comment on my (this new) SO post, saying just, "Hmm, that's silly of CSS Tidy. 
Maybe we should change that default.".  I assume he probably has a lot on his 
plate, to the point that his answers are incredibly terse and not necessarily 
very helpful.

I did see the message about CSStidy no longer being developed (if that is the 
meaning behind "suspended").  Yet when i was researching it, many people were 
still recommending it.  No?  Do you know/prefer something else for the purpose 
of cleaning user-input CSS bound for an external style sheet?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to