Teach jericho extractor srcset

This commit is contained in:
Alex Osborne
2019-03-16 15:47:50 +09:00
parent e1d93e3308
commit 2a34fcffd6
2 changed files with 7 additions and 9 deletions
@@ -196,6 +196,13 @@ public class JerichoExtractorHTML extends ExtractorHTML {
processEmbed(curi, attrValue, context, hopType);
}
// SRCSET
if (((attr = attributes.get("srcset")) != null) &&
((attrValue = attr.getValue()) != null)) {
codebase = StringEscapeUtils.unescapeHtml(attrValue);
CharSequence context = elementContext(elementName, attr.getKey());
processEmbed(curi, codebase, context);
}
// CODEBASE
if (((attr = attributes.get("codebase")) != null) &&
((attrValue = attr.getValue()) != null)) {
@@ -151,15 +151,6 @@ public class JerichoExtractorHTMLTest extends ExtractorHTMLTest {
@Override
public void testConditionalComment1() throws URIException {
}
/*
* Override of ExtractorHTMLTest method because the test fails with
* JerichoExtractorHTML
*/
@Override
public void testImgSrcSetAttribute() throws URIException {
// jericho parser doesn't understand srcset
}
/*
* Override of ExtractorHTMLTest method because the test fails with