Re: is there a way to stop HTMLPurifier/CSStidy from forcing input CSS into all lowercase?
| From: | Govinda | Date: | Fri, 01 Jun 2012 20:22:10 +0000 |
| Subject: | Re: is there a way to stop HTMLPurifier/CSStidy from forcing input CSS into all lowercase? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318090@lists.php.net to get a copy of this message | ||
we got off list, without meaning to, it seems.
Here are the last few posts in the thread:
>
>>> On Fri, Jun 1, 2012 at 12:46 AM, Govinda <govinda.webdnatalk@gmail.com> wrote:
>>>>> Perhaps you should spend some time looking for a better text editor
>>>>> for your OS. :) When the current tools I use does not give
>>>>> satisfactory progress in what I'd like to do, I replace the tool(s).
>>>>
>>>> I am happy with my editor. It (BBedit) has good multi-file search-replace... and I
>>>> can also generate that/a full list of where all is strtolower().. BUT I do not want to just willy
>>>> nilly comment out/remove all those instances of strtolower(), because even if it seems to
>>>> "work", I won't really know what damage I may have done to the library(ies). If I
>>>> can find just the one instance that is the culprit, without spending days trying every single spot,
>>>> one at a time, then great.. but since a lot of the code in those libraries is a bit over my head
>>>> (without spending a lot of time on it), I want something more definitive than just stabbing at every
>>>> strtolower().
>>>>
>>>> I appreciate your time and attention. When I post my OP, I was/am hoping for a
>>>> reply where someone knows what really is the situation; where is the specific offending line(s) I
>>>> can hack in the source, or better yet, just how can we set CSStidy config options through
>>>> HTMLpurifier at runtime, and so not hack the source at all.
>>>>
>>>> -Govinda
>>>
>>> You don't need to modify every strtolower statement. Just open up the
>>> files and look at that code block and the surrounding code blocks. If
>>> that doesn't make sense, then most likely it's not what you're looking
>>> for.
>>
>>
>> I tried that.. and some of the instances of strtolower() I thought very well could be the
>> culprit.. and so I commented it out... but it did not help (it was not the culprit, or else it was
>> still being overridden by another one).
>>
>> Many other instances I could not tell by looking at the code.
>>
>> Some were pretty clearly not the culprit.
>>
>>> In Notepad++, double clicking on a line in the search results
>>> window will open up the file and bring you right to that line. If
>>> BBedit doesn't do that, then refer back to my comment about the tools
>>> you use :) Just my 2 cents.
>>
>> BBedit too does do that :-)
>>
>>>
>>> BTW, I rather dig through the code 1st and see what strength and
>>> weakness that framework provides and to fully comprehend if all its
>>> bells and whistles are as others claim. What may work for others may
>>> not for you. For example, in all my past searches for a PHP
>>> framework, only Yii managed to fulfill the most of what I want in a
>>> framework, including and specifically ability to create CRUD UI by
>>> just specifying the table name after the DB configurations are set.
>>> But more than that, Yii went beyond my expectation by providing the
>>> client side validation for the CRUD too. Granted the UI doesn't fit
>>> my liking but it does more than the other frameworks I've looked at.
>>> :)
>>
>> I have been pleased with the frameworks and libraries I have picked to help me out.. even
>> HTMLpurifier and CSStidy have been great.. It was not until now (too deep in to want to go back)
>> that I realized I have this one issue.
>>
>> I am just about to hand off this code.. just need to find a way to patch/workaround this
>> one thing.. have another new project stating monday.
>>
>> In case I seem irreverent.. it is not my intention... I appreciate you even bothering to
>> reply :-)
>> -Govinda
>
> Have you tried using xdebug and step through the code to look for
> changes? IIRC, xdebug is capable of monitoring variables and their
> values.
AFAICT that is a brilliant idea - put a watch on the var(s) until I can trace just exactly where
the offending line is.
[snip]
I have yet to bring my tools up to speed to do that here in PHP. I won't have time before
this thing is out the door.. but thanks for reminding me I need to check out something like xdebug
sooner than later.
-G