Allow xml extractor to handle urls in CDATA.

This commit is contained in:
Hunter Stern
2014-08-01 17:37:31 -07:00
parent 4298c3de69
commit 7f1700400b
@@ -56,7 +56,8 @@ public class ExtractorXML extends ContentExtractor {
Logger.getLogger(ExtractorXML.class.getName());
static final Pattern XML_URI_EXTRACTOR = Pattern
.compile("(?s)[\"\'>]\\s*([^<>\\s'\"@]+)\\s*[\"\'<]");
.compile("(?s)[\"\'>]\\s*(?:<!\\[CDATA\\[)?([^<>\\s\'\"@]+)\\s*(?:\\]\\]>)?[\"\'<]");
// GROUPS:
// (G1) possible uri