abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r568196 - /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/SafeContentWhiteListParseFilter.java
Date Tue, 21 Aug 2007 17:16:18 GMT
Author: jmsnell
Date: Tue Aug 21 10:16:18 2007
New Revision: 568196

URL: http://svn.apache.org/viewvc?rev=568196&view=rev
Log:
be forgiving... ignore case

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/SafeContentWhiteListParseFilter.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/SafeContentWhiteListParseFilter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/SafeContentWhiteListParseFilter.java?rev=568196&r1=568195&r2=568196&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/SafeContentWhiteListParseFilter.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/filter/SafeContentWhiteListParseFilter.java
Tue Aug 21 10:16:18 2007
@@ -27,7 +27,7 @@
   implements ParseFilter {
 
   private static enum xhtml_elements {
-    a, abbr, acronym, address, area, b, big, blockquote, 
+    a, abbr, acronym, address, area, b, bdo, big, blockquote, 
     br, button, caption, center, cite, code, col, colgroup, 
     dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, 
     h1, h2, h3, h4, h5, h6, hr, i, img, input, ins, kbd, label, 
@@ -48,17 +48,17 @@
     vspace, width;
     
     static String fix(String v) {
-      if (v.equals("char"))  return "CHAR";
-      if (v.equals("for"))   return "FOR";
-      if (v.equals("class")) return "CLASS";
-      return v;
+      if (v.equalsIgnoreCase("char"))  return "CHAR";
+      if (v.equalsIgnoreCase("for"))   return "FOR";
+      if (v.equalsIgnoreCase("class")) return "CLASS";
+      return v.toLowerCase();
     }
   };
   
   public boolean acceptable(QName qname) {
     if (qname.getNamespaceURI().equals(Constants.XHTML_NS)) {
       try {
-        xhtml_elements.valueOf(qname.getLocalPart());
+        xhtml_elements.valueOf(qname.getLocalPart().toLowerCase());
         return true;
       } catch (Exception e) {}
       return false;



Mime
View raw message