From kde-commits Sat Feb 19 22:43:38 2011 From: Maks Orlovich Date: Sat, 19 Feb 2011 22:43:38 +0000 To: kde-commits Subject: =?utf-8?q?=5Bkdelibs=5D_khtml/html=3A_When_recovering_from_broke?= Message-Id: <20110219224338.B70FFA60D2 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129815546728575 Git commit 6dc6242397915a7cc5fdcbb65f5a93bf02b2fc70 by Maks Orlovich. Committed on 13/02/2011 at 18:01. Pushed by orlovich into branch 'master'. When recovering from broken comments we only want to strip > not a --> that's not there. BUG: 265564 M +2 -1 khtml/html/htmltokenizer.cpp http://commits.kde.org/kdelibs/6dc6242397915a7cc5fdcbb65f5a93bf02b2fc70 diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp index 1b9f62c..b64e83d 100644 --- a/khtml/html/htmltokenizer.cpp +++ b/khtml/html/htmltokenizer.cpp @@ -546,7 +546,8 @@ void HTMLTokenizer::parseComment(TokenizerString &src) rawContent[ rawContentSize ] = 0; rawContent[ rawContentSize + 1 ] = 0; currToken.tid = ID_COMMENT; - processListing(TokenizerString(rawContent, rawContentSize - 3)); + int size = scriptEnd ? rawContentSize - 3 : rawContentSize - 1; + processListing(TokenizerString(rawContent, size)); processToken(); currToken.tid = ID_COMMENT + ID_CLOSE_TAG; processToken();