diff options
author | Anthony Durity <gravious@jollyrotten.org> | 2011-04-19 15:06:42 +0300 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-04-22 11:22:23 +0200 |
commit | 5134e825e836ba0f9187c1289bd0c9ed0c16c605 (patch) | |
tree | ae93b9bfe16eb37cc2e442fab439572509e839fd /sw | |
parent | 5c4746f37f0ea657cca9e2cb8f745ebcbdcb83bb (diff) |
Resolves: fdo#36080 fdo#34666 process unknown html tags better
Diffstat (limited to 'sw')
-rw-r--r-- | 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 05cb2a22ec71..3297f75b62a4 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) ) |