[Libreoffice] [REVIEW] Re: [PATCH] Bug 36390 <title /> breaks html filter fixed

Caolán McNamara caolanm at redhat.com
Fri Jun 3 06:05:04 PDT 2011


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.



More information about the LibreOffice mailing list