Author: markus
Date: Fri Jun 24 14:37:57 2011
New Revision: 1139329

URL: http://svn.apache.org/viewvc?rev=1139329&view=rev
Log:
NUTCH-1006 MetaEquiv with single quotes not accepted

Modified:
    nutch/branches/branch-1.4/CHANGES.txt
    
nutch/branches/branch-1.4/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java

Modified: nutch/branches/branch-1.4/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/nutch/branches/branch-1.4/CHANGES.txt?rev=1139329&r1=1139328&r2=1139329&view=diff
==============================================================================
--- nutch/branches/branch-1.4/CHANGES.txt (original)
+++ nutch/branches/branch-1.4/CHANGES.txt Fri Jun 24 14:37:57 2011
@@ -2,6 +2,8 @@ Nutch Change Log
 
 Release 1.4 - Current development
 
+* NUTCH-1006 MetaEquiv with single quotes not accepted (markus)
+
 * NUTCH-1010 ContentLength not trimmed (markus)
 
 Release 1.3 - 6/4/2011

Modified: 
nutch/branches/branch-1.4/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
URL: 
http://svn.apache.org/viewvc/nutch/branches/branch-1.4/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java?rev=1139329&r1=1139328&r2=1139329&view=diff
==============================================================================
--- 
nutch/branches/branch-1.4/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
 (original)
+++ 
nutch/branches/branch-1.4/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
 Fri Jun 24 14:37:57 2011
@@ -48,8 +48,10 @@ public class HtmlParser implements Parse
   // 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 accepted
   private 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]*)",


Reply via email to