Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for <ol reversed>, related attributes #396

Merged
merged 4 commits into from
Mar 3, 2023

Conversation

twm
Copy link
Contributor

@twm twm commented Jun 10, 2018

  • Mark <ol reversed> as a boolean attribute so it serializes properly in HTML.
  • Allow <ol reversed> in the sanitizer. Closes Sanitizer removes the <ol> "reversed" attribute #321.
  • Allow <ol start> in the sanitizer.
  • <ol type> was already allowed, but probably accidentally (type is an attribute allowed for other tags). I added a test to prevent it from regressing in case we add per-element attribute sanitization in the future.

https://html.spec.whatwg.org/multipage/grouping-content.html#attr-ol-reversed

* Mark <ol reversed> as a boolean attribute so it serializes properly in
  HTML.
* Allow <ol reversed> in the sanitizer. Closes html5lib#321.
* Allow <ol start> in the sanitizer.
* <ol type> was already allowed, but probably accidentally (type is an
  attribute allowed for other tags). I added a test to prevent it from
  regressing in case we add per-element attribute sanitization in the
  future.

https://html.spec.whatwg.org/multipage/grouping-content.html#attr-ol-reversed
twm added a commit to twm/html5lib-python that referenced this pull request Jun 10, 2018
It looks like this was missed in html5lib#358. It is causing build failures in html5lib#395 and html5lib#396.
gsnedders pushed a commit that referenced this pull request Oct 1, 2018
It looks like this was missed in #358. It is causing build failures in #395 and #396.
@codecov-io
Copy link

codecov-io commented Oct 7, 2018

Codecov Report

Merging #396 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #396      +/-   ##
=========================================
+ Coverage   90.79%   90.8%   +0.01%     
=========================================
  Files          50      50              
  Lines        6952    6964      +12     
  Branches     1328    1328              
=========================================
+ Hits         6312    6324      +12     
  Misses        481     481              
  Partials      159     159
Impacted Files Coverage Δ
html5lib/filters/sanitizer.py 93.16% <ø> (ø) ⬆️
html5lib/constants.py 100% <ø> (ø) ⬆️
html5lib/tests/test_sanitizer.py 95.34% <100%> (+0.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f92357...4b34642. Read the comment docs.

@ambv ambv merged commit 01b7dea into html5lib:master Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sanitizer removes the <ol> "reversed" attribute
4 participants