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

Support the <wbr> element#395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 5 commits intohtml5lib:masterfromtwm:wbr
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletionsCHANGES.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,13 +4,23 @@ Change Log
1.2
~~~

Unreleased yet

Features:

* Add support for the ``<wbr>`` element in the sanitizer, `which indicates
a line break opportunity <https://html.spec.whatwg.org/#the-wbr-element>`_.
This element is allowed by default. (#395) (Thank you, Tom Most!)

Bug fixes:

* The sanitizer now permits ``<summary>`` tags.

1.1
~~~

Released on June 23, 2020

Breaking changes:

* Drop support for Python 3.3. (#358)
Expand Down
3 changes: 2 additions & 1 deletionhtml5lib/constants.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -571,7 +571,8 @@
"col",
"input",
"source",
"track"
"track",
"wbr",
])

cdataElements = frozenset(['title', 'textarea'])
Expand Down
1 change: 1 addition & 0 deletionshtml5lib/filters/sanitizer.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -129,6 +129,7 @@
(namespaces['html'], 'ul'),
(namespaces['html'], 'var'),
(namespaces['html'], 'video'),
(namespaces['html'], 'wbr'),
(namespaces['mathml'], 'maction'),
(namespaces['mathml'], 'math'),
(namespaces['mathml'], 'merror'),
Expand Down
6 changes: 6 additions & 0 deletionshtml5lib/tests/test_sanitizer.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,6 +55,12 @@ def test_data_uri_disallowed_type():
assert expected == sanitized


def test_wbr_allowed():
sanitized = sanitize_html('<wbr>')
expected = '<wbr/>'
assert expected == sanitized


def param_sanitizer():
for ns, tag_name in sanitizer.allowed_elements:
if ns != constants.namespaces["html"]:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp