Revision: 4797
Author:   metaweta
Date:     Wed Feb 29 16:55:44 2012
Log:      Whitelists input type=file
http://codereview.appspot.com/5714045

Whitelists input type=file.

R=jasvir

http://code.google.com/p/google-caja/source/detail?r=4797

Modified:
 /trunk/src/com/google/caja/lang/html/html4-attributes.json
 /trunk/tests/com/google/caja/lang/html/HtmlSchemaTest.java

=======================================
--- /trunk/src/com/google/caja/lang/html/html4-attributes.json Tue Jan 24 11:04:08 2012 +++ /trunk/src/com/google/caja/lang/html/html4-attributes.json Wed Feb 29 16:55:44 2012
@@ -65,8 +65,8 @@
       },
       {
         "key": "INPUT::TYPE",
- "description": "what kind of widget is needed -- disallows FILE and PASSWORD",
-        "values": "text,checkbox,radio,submit,reset,hidden,image,button",
+ "description": "what kind of widget is needed -- disallows PASSWORD",
+        "values": "text,checkbox,radio,submit,reset,hidden,image,button,file",
         "optional": true, "default": "TEXT"
       }
       ]
=======================================
--- /trunk/tests/com/google/caja/lang/html/HtmlSchemaTest.java Tue Jan 24 11:04:08 2012 +++ /trunk/tests/com/google/caja/lang/html/HtmlSchemaTest.java Wed Feb 29 16:55:44 2012
@@ -120,9 +120,9 @@
                .getValueCriterion().accept("TEXT"));
     assertTrue(lookupAttribute("input", "type")
                .getValueCriterion().accept("button"));
-    assertFalse(lookupAttribute("input", "type")
+    assertTrue(lookupAttribute("input", "type")
                 .getValueCriterion().accept("file"));
-    assertFalse(lookupAttribute("input", "type")
+    assertTrue(lookupAttribute("input", "type")
                 .getValueCriterion().accept("FILE"));
     assertFalse(lookupAttribute("input", "type")
                 .getValueCriterion().accept("bogus"));

Reply via email to