Reviewers: Jasvir,

Description:
Whitelists input type=file.

Please review this at http://codereview.appspot.com/5714045/

Affected files:
  M     src/com/google/caja/lang/html/html4-attributes.json
  M     tests/com/google/caja/lang/html/HtmlSchemaTest.java


Index: tests/com/google/caja/lang/html/HtmlSchemaTest.java
===================================================================
--- tests/com/google/caja/lang/html/HtmlSchemaTest.java (revision 4796)
+++ tests/com/google/caja/lang/html/HtmlSchemaTest.java (working copy)
@@ -121,10 +121,6 @@
     assertTrue(lookupAttribute("input", "type")
                .getValueCriterion().accept("button"));
     assertFalse(lookupAttribute("input", "type")
-                .getValueCriterion().accept("file"));
-    assertFalse(lookupAttribute("input", "type")
-                .getValueCriterion().accept("FILE"));
-    assertFalse(lookupAttribute("input", "type")
                 .getValueCriterion().accept("bogus"));
     assertFalse(lookupAttribute("input", "type")
                 .getValueCriterion().accept(""));
Index: src/com/google/caja/lang/html/html4-attributes.json
===================================================================
--- src/com/google/caja/lang/html/html4-attributes.json (revision 4796)
+++ src/com/google/caja/lang/html/html4-attributes.json (working copy)
@@ -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"
       }
       ]


Reply via email to