Subject: | A potential bug on parsing html doc |
Date: | Tue, 19 Nov 2013 07:27:33 -0800 (PST) |
To: | "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org> |
From: | Jin Qian <qj1020 [...] yahoo.com> |
Dear maintainer,
When I ran the following code snippet, it gave me lots of errors:
HTML parser error : Unexpected end tag : span
pan id="turn-off-highlight-control"><span class="highlight"> X </span>
^
HTML parser error : Unexpected end tag : a
avascript:void(0)" onclick="Nabble.turnOffHighlight()">Turn off highlighting</a>
................lots of it...........
My guess is that it was trying to parsing a piece of code in script section:
if (Nabble.hasHighlightedTerms && !hasTurnOff) {
var turnOffLink = '<span id="turn-off-highlight-control"><span class="highlight"> X </span> ';
turnOffLink += '<a href="javascript:void(0)" onclick="Nabble.turnOffHighlight()">Turn off highlighting</a></span>';
$('#topics-controls-right').prepend(turnOffLink);
hasTurnOff = true;
}
Can somone confirm and point out a solution?
Thanks in advance,
Jin
Perl: 5.12.4
XML::LibXML: XML::LibXML::LIBXML_VERSION=20623
====================code snippet==========================
use XML::LibXML;
my $doc = XML::LibXML->load_html(location => "http://jmeter.512774.n5.nabble.com/When-to-use-the-option-quot-Retrieve-All-Embedded-Resources-from-HTML-Files-quot-td529219.html");