try {
Float ieVersion = extractIEVersion(userAgent);
String contents = new String(html,encoding);
// As per Jodd javadocs, emitStrings should be false for visitor for better performances
LagartoParser lagartoParser = new LagartoParser(contents, false);
LagartoParserConfig<LagartoParserConfig<?>> config = new LagartoParserConfig<LagartoParserConfig<?>>();
config.setCaseSensitive(false);
// Conditional comments only apply for IE < 10
config.setEnableConditionalComments(isEnableConditionalComments(ieVersion));
lagartoParser.setConfig(config);
JMeterTagVisitor tagVisitor = new JMeterTagVisitor(new URLPointer(baseUrl), coll, ieVersion);
lagartoParser.parse(tagVisitor);
return coll.iterator();
} catch (LagartoException e) {
// TODO is it the best way ? https://issues.apache.org/bugzilla/show_bug.cgi?id=55634
if(log.isDebugEnabled()) {
log.debug("Error extracting embedded resource URLs from:'"+baseUrl+"', probably not text content, message:"+e.getMessage());