[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Fri Apr 22 02:52:44 PDT 2011
sw/source/filter/html/swhtml.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit a1be91f68d42f5da78947c9ceceec37fef5afb57
Author: Anthony Durity <gravious at jollyrotten.org>
Date: Tue Apr 19 15:06:42 2011 +0300
Resolves: fdo#36080 fdo#34666 process unknown html tags better
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 4f7f945..3a46326 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1235,7 +1235,8 @@ void SwHTMLParser::NextToken( int nToken )
else if( aUnknownToken.Len() )
{
// Paste content of unknown tags.
- if (aToken.Len() > 0)
+ // (but surely if we are not in the header section) fdo#36080 fdo#34666
+ if (aToken.Len() > 0 && !IsInHeader() )
{
if( !bDocInitalized )
DocumentDetected();
@@ -2027,6 +2028,8 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_UNKNOWNCONTROL_ON:
// Ignore content of unknown token in the header, if the token
// does not start with a '!'.
+ // (but judging from the code, also if does not start with a '%')
+ // (and also if we're not somewhere we consider PRE)
if( IsInHeader() && !IsReadPRE() && !aUnknownToken.Len() &&
sSaveToken.Len() && '!' != sSaveToken.GetChar(0) &&
'%' != sSaveToken.GetChar(0) )
More information about the Libreoffice-commits
mailing list