Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Thu, 2011-04-28 at 21:32 +0200, Chr. Rossmanith wrote:
Hi,
my fix for bug 34666 has been too conservative. Now the test for 
HTML_UNKNOWNCONTROL_ON is removed and
<title /> is treated correctly (c.f. bug 36390). I'm not sure whether 
there should be a test if the token is a "ONOFF" token?

So, the original html parser code we've inherited there is really hacky
and I rather poke out my eyes than read more of its horrors, but lets
take it as a given for the moment and work within its boundaries.

I think, yes, we could do with an additional ONOFF token test in there.
That would be...

if (HTML_TOKEN_ONOFF & nToken)
   ...

And I'm not sure if bug 36080 should be listed in the comment as well, but the 
strange behaviour is mentioned in the discussion of 36080.

Sure, that makes sense. Add all the relevant bugids to help the next
misfortunate trying to make sense of it.

Just to emphasize: I didn't push yet because I'd like to have the 
questions answered first...

So, with
-if (aToken.Len() >= 1 && '/' == aToken.GetChar(aToken.Len()-1)) {
+if (aToken.Len() >= 1 && '/' == aToken.GetChar(aToken.Len()-1) && (nRet
& HTML_TOKEN_ONOFF)) {
it looks sane to me.

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.