Apache Nutch is an extensible and scalable web crawler
NUTCH-1006 MetaEquiv with single quotes not accepted
Markus Jelsmac6e6042eaa2d
diff --git a/CHANGES.txt b/CHANGES.txtindex 3b1a0947c..debe01548 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogRelease 1.4 - Current development+* NUTCH-1006 MetaEquiv with single quotes not accepted (markus)+* NUTCH-1010 ContentLength not trimmed (markus)Release 1.3 - 6/4/2011diff --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 eb841a57e..df9e2259c 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@@ -48,8 +48,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]*)",