Skip to content

Commit d270666

Browse files
committed
Merge remote-tracking branch 'upstream/master' into update-docs
2 parents 5eb89cc + 9f9dfdb commit d270666

File tree

5 files changed

+82
-2
lines changed

5 files changed

+82
-2
lines changed

AUTHORS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Patches and suggestions
3232
- Andreas Madsack
3333
- Karim Valiev
3434
- Marc DM
35+
- Ritwik Gupta
3536
- Tony Lopes
3637
- lilbludevil
3738
- Simon Sapin
@@ -42,4 +43,6 @@ Patches and suggestions
4243
- Michael[tm] Smith
4344
- Marc Abramowitz
4445
- Jon Dufresne
46+
- Ville Skyttä
47+
- Jonathan Vanasco
4548
- Tom Most

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
----------
33

4+
unreleased
5+
~~~~~~~~~~~~~~~~~~
6+
7+
* Added the seamless attribute for iframes.
8+
* Added `itemscope` as boolean attribute
9+
https://github.com/html5lib/html5lib-python/issues/194
10+
411
0.999999999/1.0b10
512
~~~~~~~~~~~~~~~~~~
613

html5lib/_ihatexml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def escapeRegexp(string):
180180
nonXmlNameFirstBMPRegexp = re.compile('[\x00-@\\[-\\^`\\{-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u0385\u0387\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u0640\u064b-\u0670\u06b8-\u06b9\u06bf\u06cf\u06d4\u06d6-\u06e4\u06e7-\u0904\u093a-\u093c\u093e-\u0957\u0962-\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09db\u09de\u09e2-\u09ef\u09f2-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a58\u0a5d\u0a5f-\u0a71\u0a75-\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abc\u0abe-\u0adf\u0ae1-\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3c\u0b3e-\u0b5b\u0b5e\u0b62-\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c5f\u0c62-\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cdd\u0cdf\u0ce2-\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d5f\u0d62-\u0e00\u0e2f\u0e31\u0e34-\u0e3f\u0e46-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eb1\u0eb4-\u0ebc\u0ebe-\u0ebf\u0ec5-\u0f3f\u0f48\u0f6a-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3006\u3008-\u3020\u302a-\u3040\u3095-\u30a0\u30fb-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]') # noqa
181181

182182
# Simpler things
183-
nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\-\'()+,./:=?;!*#@$_%]")
183+
nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\\-'()+,./:=?;!*#@$_%]")
184184

185185

186186
class InfosetFilter(object):

html5lib/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@
588588
])
589589

590590
booleanAttributes = {
591-
"": frozenset(["irrelevant"]),
591+
"": frozenset(["irrelevant", "itemscope"]),
592592
"style": frozenset(["scoped"]),
593593
"img": frozenset(["ismap"]),
594594
"audio": frozenset(["autoplay", "controls"]),
@@ -606,6 +606,7 @@
606606
"input": frozenset(["disabled", "readonly", "required", "autofocus", "checked", "ismap"]),
607607
"select": frozenset(["disabled", "readonly", "autofocus", "multiple"]),
608608
"output": frozenset(["disabled", "readonly"]),
609+
"iframe": frozenset(["seamless"]),
609610
}
610611

611612
# entitiesWindows1252 has to be _ordered_ and needs to have an index. It

html5lib/tests/serializer-testdata/options.test

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,29 @@
4646
"quote_attr_values": "always"
4747
}
4848
},
49+
{
50+
"expected": [
51+
"<div itemscope>"
52+
],
53+
"input": [
54+
[
55+
"StartTag",
56+
"http://www.w3.org/1999/xhtml",
57+
"div",
58+
[
59+
{
60+
"namespace": null,
61+
"name": "itemscope",
62+
"value": "itemscope"
63+
}
64+
]
65+
]
66+
],
67+
"description": "quote_attr_values='always' with itemscope",
68+
"options": {
69+
"quote_attr_values": "always"
70+
}
71+
},
4972
{
5073
"expected": [
5174
"<div irrelevant>"
@@ -171,6 +194,29 @@
171194
"use_trailing_solidus": true
172195
}
173196
},
197+
{
198+
"expected": [
199+
"<div itemscope=itemscope>"
200+
],
201+
"input": [
202+
[
203+
"StartTag",
204+
"http://www.w3.org/1999/xhtml",
205+
"div",
206+
[
207+
{
208+
"namespace": null,
209+
"name": "itemscope",
210+
"value": "itemscope"
211+
}
212+
]
213+
]
214+
],
215+
"description": "minimize_boolean_attributes=false",
216+
"options": {
217+
"minimize_boolean_attributes": false
218+
}
219+
},
174220
{
175221
"expected": [
176222
"<div irrelevant=irrelevant>"
@@ -194,6 +240,29 @@
194240
"minimize_boolean_attributes": false
195241
}
196242
},
243+
{
244+
"expected": [
245+
"<div itemscope=\"\">"
246+
],
247+
"input": [
248+
[
249+
"StartTag",
250+
"http://www.w3.org/1999/xhtml",
251+
"div",
252+
[
253+
{
254+
"namespace": null,
255+
"name": "itemscope",
256+
"value": ""
257+
}
258+
]
259+
]
260+
],
261+
"description": "minimize_boolean_attributes=false with empty value",
262+
"options": {
263+
"minimize_boolean_attributes": false
264+
}
265+
},
197266
{
198267
"expected": [
199268
"<div irrelevant=\"\">"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy