Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2d72f22

Browse files
committed
Support the <wbr> element
1 parent950ea0e commit2d72f22

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

‎CHANGES.rst

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

4+
1.1.0
5+
~~~~~
6+
7+
Features:
8+
9+
* Add support for the ``<wbr>`` element, `which indicates a line break
10+
opportunity <https://html.spec.whatwg.org/#the-wbr-element>`_. This element
11+
is allowed by default by the sanitizer. (#395) (Thank you, Tom Most!)
12+
413
1.0.1
514
~~~~~
615

‎html5lib/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@
572572
"col",
573573
"input",
574574
"source",
575-
"track"
575+
"track",
576+
"wbr",
576577
])
577578

578579
cdataElements=frozenset(['title','textarea'])

‎html5lib/filters/sanitizer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
(namespaces['html'],'ul'),
112112
(namespaces['html'],'var'),
113113
(namespaces['html'],'video'),
114+
(namespaces['html'],'wbr'),
114115
(namespaces['mathml'],'maction'),
115116
(namespaces['mathml'],'math'),
116117
(namespaces['mathml'],'merror'),

‎html5lib/tests/test_sanitizer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ def test_data_uri_disallowed_type():
5959
assertexpected==sanitized
6060

6161

62+
deftest_wbr_allowed():
63+
sanitized=sanitize_html('<wbr>')
64+
expected='<wbr/>'
65+
assertexpected==sanitized
66+
67+
6268
deftest_sanitizer():
6369
forns,tag_nameinsanitizer.allowed_elements:
6470
ifns!=constants.namespaces["html"]:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp