Skip to content

Sanitizer removes the <ol> "reversed" attribute #321

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

Closed
Deimos opened this issue Feb 22, 2017 · 0 comments · Fixed by #396
Closed

Sanitizer removes the <ol> "reversed" attribute #321

Deimos opened this issue Feb 22, 2017 · 0 comments · Fixed by #396

Comments

@Deimos
Copy link

Deimos commented Feb 22, 2017

reversed is a boolean attribute on <ol> that can be used to make descending lists. The sanitizer seems to be stripping this (it's not included in allowed_attributes).

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

twm added a commit to twm/html5lib-python that referenced this issue Jun 10, 2018
* 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
@ambv ambv closed this as completed in #396 Mar 3, 2023
ambv added a commit that referenced this issue Mar 3, 2023
* Mark <ol reversed> as a boolean attribute so it serializes properly in
  HTML.
* Allow <ol reversed> in the sanitizer. Closes #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

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants