Allow ExtractorJS to detect urls within unicode code points for " and \'

This commit is contained in:
Hunter Stern
2014-09-02 15:18:13 -07:00
parent 25c3b3e680
commit ea235f4466
@@ -67,7 +67,8 @@ public class ExtractorJS extends ContentExtractor {
// (areas between paired ' or " characters, possibly backslash-quoted
// on the ends, but not in the middle)
protected static final String JAVASCRIPT_STRING_EXTRACTOR =
"(\\\\{0,8}+['\"])([^\\s'\"]{1,"+UURI.MAX_URL_LENGTH+"})(?:\\1)";
"(\\\\{0,8}+['\"\\\\u{0027}\\\\u{0022}])([^\\s'\"]{1,"+UURI.MAX_URL_LENGTH+"})(?:\\1)";
// GROUPS:
// (G1) ' or " with optional leading backslashes
// (G2) whitespace-free string delimited on boths ends by G1