|
10 | 10 | "PLAINTEXT":3 |
11 | 11 | } |
12 | 12 |
|
13 | | -scopingElements = frozenset(("button", "caption", "html", "marquee", "object", |
14 | | - "table", "td", "th")) |
| 13 | +scopingElements = frozenset(( |
| 14 | + "button", |
| 15 | + "caption", |
| 16 | + "html", |
| 17 | + "marquee", |
| 18 | + "object", |
| 19 | + "table", |
| 20 | + "td", |
| 21 | + "th" |
| 22 | +)) |
15 | 23 |
|
16 | | -formattingElements = frozenset(("a", "b", "big", "em", "font", "i", "nobr", |
17 | | - "s", "small", "strike", "strong", "tt", "u")) |
| 24 | +formattingElements = frozenset(( |
| 25 | + "a", |
| 26 | + "b", |
| 27 | + "big", |
| 28 | + "em", |
| 29 | + "font", |
| 30 | + "i", |
| 31 | + "nobr", |
| 32 | + "s", |
| 33 | + "small", |
| 34 | + "strike", |
| 35 | + "strong", |
| 36 | + "tt", |
| 37 | + "u" |
| 38 | +)) |
18 | 39 |
|
19 | | -specialElements = frozenset(("address", "area", "base", "basefont", "bgsound", |
20 | | - "blockquote", "body", "br", "center", "col", |
21 | | - "colgroup", "dd", "dir", "div", "dl", "dt", |
22 | | - "embed", "fieldset", "form", "frame", "frameset", |
23 | | - "h1", "h2", "h3", "h4", "h5", "h6", "head", "hr", |
24 | | - "iframe", "image", "img", "input", "isindex", "li", |
25 | | - "link", "listing", "menu", "meta", "noembed", |
26 | | - "noframes", "noscript", "ol", "optgroup", "option", |
27 | | - "p", "param", "plaintext", "pre", "script", |
28 | | - "select", "spacer", "style", "tbody", "textarea", |
29 | | - "tfoot", "thead", "title", "tr", "ul", "wbr")) |
| 40 | +specialElements = frozenset(( |
| 41 | + "address", |
| 42 | + "area", |
| 43 | + "base", |
| 44 | + "basefont", |
| 45 | + "bgsound", |
| 46 | + "blockquote", |
| 47 | + "body", |
| 48 | + "br", |
| 49 | + "center", |
| 50 | + "col", |
| 51 | + "colgroup", |
| 52 | + "dd", |
| 53 | + "dir", |
| 54 | + "div", |
| 55 | + "dl", |
| 56 | + "dt", |
| 57 | + "embed", |
| 58 | + "fieldset", |
| 59 | + "form", |
| 60 | + "frame", |
| 61 | + "frameset", |
| 62 | + "h1", |
| 63 | + "h2", |
| 64 | + "h3", |
| 65 | + "h4", |
| 66 | + "h5", |
| 67 | + "h6", |
| 68 | + "head", |
| 69 | + "hr", |
| 70 | + "iframe", |
| 71 | + "image", |
| 72 | + "img", |
| 73 | + "input", |
| 74 | + "isindex", |
| 75 | + "li", |
| 76 | + "link", |
| 77 | + "listing", |
| 78 | + "menu", |
| 79 | + "meta", |
| 80 | + "noembed", |
| 81 | + "noframes", |
| 82 | + "noscript", |
| 83 | + "ol", |
| 84 | + "optgroup", |
| 85 | + "option", |
| 86 | + "p", |
| 87 | + "param", |
| 88 | + "plaintext", |
| 89 | + "pre", |
| 90 | + "script", |
| 91 | + "select", |
| 92 | + "spacer", |
| 93 | + "style", |
| 94 | + "tbody", |
| 95 | + "textarea", |
| 96 | + "tfoot", |
| 97 | + "thead", |
| 98 | + "title", |
| 99 | + "tr", |
| 100 | + "ul", |
| 101 | + "wbr" |
| 102 | +)) |
30 | 103 |
|
31 | | -spaceCharacters = frozenset((u"\t", u"\n", u"\u000B", u"\u000C", u" ")) |
| 104 | +spaceCharacters = frozenset(( |
| 105 | + u"\t", |
| 106 | + u"\n", |
| 107 | + u"\u000B", |
| 108 | + u"\u000C", |
| 109 | + u" " |
| 110 | +)) |
32 | 111 |
|
33 | | -headingElements = frozenset(("h1", "h2", "h3", "h4", "h5", "h6")) |
| 112 | +headingElements = frozenset(( |
| 113 | + "h1", |
| 114 | + "h2", |
| 115 | + "h3", |
| 116 | + "h4", |
| 117 | + "h5", |
| 118 | + "h6" |
| 119 | +)) |
34 | 120 |
|
35 | | -#What about event-source and command? |
36 | | -voidElements = frozenset(("base", "link", "meta", "hr", "br", "img", "embed", |
37 | | - "param", "area", "col", "input")) |
| 121 | +# XXX What about event-source and command? |
| 122 | +voidElements = frozenset(( |
| 123 | + "base", |
| 124 | + "link", |
| 125 | + "meta", |
| 126 | + "hr", |
| 127 | + "br", |
| 128 | + "img", |
| 129 | + "embed", |
| 130 | + "param", |
| 131 | + "area", |
| 132 | + "col", |
| 133 | + "input" |
| 134 | +)) |
38 | 135 |
|
39 | 136 | entitiesWindows1252 = { |
40 | 137 | 128: 8364, # 0x80 0x20AC EURO SIGN |
|
0 commit comments