Apache Nutch is an extensible and scalable web crawler
NUTCH-1006 MetaEquiv with single quotes not accepted
Markus Jelsmaedb7faa2ebcc
diff --git a/CHANGES.txt b/CHANGES.txtindex 8123f0833..f886176b2 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogRelease 2.0 - Current Development+* NUTCH-1006 MetaEquiv with single quotes not accepted (markus)+* NUTCH-1010 ContentLength not trimmed (markus)* NUTCH-995 Generate POM file using the Ivy makepom task (mattmann, jnioche, Gabriele Kahlout)diff --git a/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java b/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.javaindex 98717cb09..8c282d79c 100644--- a/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java+++ b/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java@@ -68,8 +68,10 @@ public class HtmlParser implements Parser {// meta tag well past the first 1000 bytes.// (e.g. http://cn.promo.yahoo.com/customcare/music.html)private static final int CHUNK_SIZE = 2000;++ // NUTCH-1006 Meta equiv with single quotes not acceptedprivate static Pattern metaPattern =- Pattern.compile("<meta\\s+([^>]*http-equiv=\"?content-type\"?[^>]*)>",+ Pattern.compile("<meta\\s+([^>]*http-equiv=(\"|')?content-type(\"|')?[^>]*)>",Pattern.CASE_INSENSITIVE);private static Pattern charsetPattern =Pattern.compile("charset=\\s*([a-z][_\\-0-9a-z]*)",