a6429f8c22
Completely removed the html5lib sanitizer. Fixed the string-handling to work in both Ruby 1.8.x and 1.9.2. There are still, inexplicably, two functional tests that fail. But the rest seems to work quite well.
152 lines
5.4 KiB
Text
Executable file
152 lines
5.4 KiB
Text
Executable file
{"tests": [
|
|
|
|
{"description": "valid single class attribute value",
|
|
"input": "<span class=a>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading space",
|
|
"input": "<span class=' a'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with trailing space",
|
|
"input": "<span class='a '>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading and trailing space",
|
|
"input": "<span class=' a '>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading tab",
|
|
"input": "<span class='\ta'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with trailing tab",
|
|
"input": "<span class='a\t'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading and trailing tab",
|
|
"input": "<span class='\ta\t'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading LF",
|
|
"input": "<span class='\na'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with trailing LF",
|
|
"input": "<span class='a\n'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading and trailing LF",
|
|
"input": "<span class='\na\n'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading LT",
|
|
"input": "<span class='\u000Ba'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with trailing LT",
|
|
"input": "<span class='a\u000B'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading and trailing LT",
|
|
"input": "<span class='\u000Ba\u000B'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading FF",
|
|
"input": "<span class='\u000Ca'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with trailing FF",
|
|
"input": "<span class='a\u000C'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading and trailing FF",
|
|
"input": "<span class='\u000Ca\u000C'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading CR",
|
|
"input": "<span class='\ra'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with trailing CR",
|
|
"input": "<span class='a\r'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid single class attribute value with leading and trailing CR",
|
|
"input": "<span class='\ra\r'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid double class attribute value separated by space",
|
|
"input": "<span class='a b'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid double class attribute value separated by tab",
|
|
"input": "<span class='a\tb'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid double class attribute value separated by LF",
|
|
"input": "<span class='a\nb'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid double class attribute value separated by LT",
|
|
"input": "<span class='a\u000Bb'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid double class attribute value separated by FF",
|
|
"input": "<span class='a\u000Cb'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "valid double class attribute value separated by CR",
|
|
"input": "<span class='a\rb'>",
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by space",
|
|
"input": "<span class='a a'>",
|
|
"fail-unless": "invalid-attribute-value"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by tab",
|
|
"input": "<span class='a\ta'>",
|
|
"fail-unless": "invalid-attribute-value"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by LF",
|
|
"input": "<span class='a\na'>",
|
|
"fail-unless": "invalid-attribute-value"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by LT",
|
|
"input": "<span class='a\u000Ba'>",
|
|
"fail-unless": "invalid-attribute-value"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by FF",
|
|
"input": "<span class='a\u000Ca'>",
|
|
"fail-unless": "invalid-attribute-value"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by CR",
|
|
"input": "<span class='a\ra'>",
|
|
"fail-unless": "duplicate-value-in-token-list"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by space",
|
|
"input": "<span class='a a'>",
|
|
"fail-unless": "duplicate-value-in-token-list"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by tab",
|
|
"input": "<span class='a\ta'>",
|
|
"fail-unless": "duplicate-value-in-token-list"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by LF",
|
|
"input": "<span class='a\na'>",
|
|
"fail-unless": "duplicate-value-in-token-list"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by LT",
|
|
"input": "<span class='a\u000Ba'>",
|
|
"fail-unless": "duplicate-value-in-token-list"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by FF",
|
|
"input": "<span class='a\u000Ca'>",
|
|
"fail-unless": "duplicate-value-in-token-list"},
|
|
|
|
{"description": "invalid duplicated class attribute value separated by CR",
|
|
"input": "<span class='a\ra'>",
|
|
"fail-unless": "duplicate-value-in-token-list"}
|
|
|
|
]}
|
|
|