summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorAnthony Durity <gravious@jollyrotten.org>2011-04-19 15:06:42 +0300
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-04-22 11:22:23 +0200
commit5134e825e836ba0f9187c1289bd0c9ed0c16c605 (patch)
treeae93b9bfe16eb37cc2e442fab439572509e839fd /sw/source
parent5c4746f37f0ea657cca9e2cb8f745ebcbdcb83bb (diff)
Resolves: fdo#36080 fdo#34666 process unknown html tags better
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/html/swhtml.cxx5
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) )