Bug 51980

Summary: HtmlParserHTMLParser double-counts images used in links
Product: JMeter - Now in Github Reporter: Sebb <sebb>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.5.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Sebb 2011-10-06 15:09:48 UTC
When HTMLParser is used to parse embedded resources of the form

<a href="http://jakarta.apache.org/"><img src="./images/jakarta-logo.gif"></a>

it adds the image to the list of URLs twice.

This is because the <img> is parsed as part of the <a> (Link) tag as well as being parsed as a part of the nested parsing of composite tags, such as the link tag.

The fix is to ignore the nested image when processing link tags.
Comment 1 Sebb 2011-10-06 15:15:08 UTC
URL: http://svn.apache.org/viewvc?rev=1179657&view=rev
Log:
Bug 51980 - HtmlParserHTMLParser double-counts images used in links

Modified:
   jakarta/jmeter/trunk/bin/testfiles/HTMLParserTestCase.html
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
   jakarta/jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:37:47 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2582