From 60dcf51585af133ab65b20aafc4d31c9b2ac09bb Mon Sep 17 00:00:00 2001 From: Anthony Durity Date: Tue, 19 Apr 2011 15:06:42 +0300 Subject: [PATCH] Resolves: fdo#36080 fdo#34666 process unknown html tags better --- sw/source/filter/html/swhtml.cxx | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 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) ) -- 1.7.4.4