On 25/Nov/10 00:11, Sam Varshavchik wrote:
> Alessandro Vesely writes:
>> On 24/Nov/10 12:56, Sam Varshavchik wrote:
>>> [As part of sanitizing]. When an entire tag is deemed to be suspect,
>>> sqwebmaild removes its entire contents, but the < > are left alone.
>>
>> Aha, so it isn't a bug.  But what is the purpose of leaving those
>> relics?  I mean, if the sanitizing code could also remove angle
>> brackets for the same price, why it doesn't it do so?
> 
> It's easier to do it that way, the way that the internal logic works.

Is that html.c?  Would you tend to accept a patch, in case I manage to
find the time to slightly change it?

> Overall, the message is formatted for display "on the fly". The entire
> message is not loaded into memory, but formatted as a stream. So,
> sqwebmail does not make excessive RAM demands, no matter how big the
> message is. It's the browser's problem to figure out how to format a
> huge HTML document.
> 
> An HTML tag gets extracted. The contents of the tag, but not the angle
> brackets around it, are passed to a sanitizing function that parses
> it, and decided whether to do anything about it. When the sanitization
> function returns, the contents of the buffered are output.
> 
> If the sanitization function decides to drop the tag, it was more
> convenient to simply clear the buffer with spaces. But the surrounding
> brackets would still be printed by the function that invokes the
> sanitization function.

How about writing something different than spaces, e.g. <noscript/> or
<!--  -->?

-- 



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to