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

Commitbbfa7a8

Browse files
committed
sanitizer: Allow <wbr> elements by default
<wbr> is a safe element, so let it be.
1 parent950ea0e commitbbfa7a8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎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