From c9054070ffc9223d05c3f4903179e3e3fd409b17 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 21 Jan 2015 15:25:03 +0000 Subject: Resolves: fdo#87601 specific html doc hangs on load Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349 (cherry picked from commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3) Reviewed-on: https://gerrit.libreoffice.org/14081 Tested-by: Michael Stahl Reviewed-by: Michael Stahl --- sw/qa/core/data/html/pass/fdo87601-1.html | 100 ++++++++++++++++++++++++++++++ sw/source/filter/html/swhtml.cxx | 2 +- 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 sw/qa/core/data/html/pass/fdo87601-1.html diff --git a/sw/qa/core/data/html/pass/fdo87601-1.html b/sw/qa/core/data/html/pass/fdo87601-1.html new file mode 100644 index 000000000000..b33f11c1b0a7 --- /dev/null +++ b/sw/qa/core/data/html/pass/fdo87601-1.html @@ -0,0 +1,100 @@ + + + + + + + + + Print + 100 + + + + + +
+
+
+

+

+ Your bug here +

+

+
+ + + + + + + + + + + + + + + + + +
xx
xx
xx
xx
+
+ + + + + + + + + + +
xxx
xxx
xxx
xxx
+ + diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 977884043339..7f3b91cf4916 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -3072,7 +3072,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, rText, pAttr->GetSttCnt() ); sal_Int32 nScriptEnd = g_pBreakIt->GetBreakIter() ->endOfScript( rText, pAttr->GetSttCnt(), nScriptTxt ); - while( nScriptEnd < nEndCnt ) + while (nScriptEnd < nEndCnt && nScriptEnd != -1) { if( nScriptItem == nScriptTxt ) { -- cgit v1.2.3