Skip to content

Add 'start' to allowed HTML attributes#782

Closed
adam-h wants to merge 1 commit intobasecamp:mainfrom
polleverywhere:ah/sync-0.8-beta
Closed

Add 'start' to allowed HTML attributes#782
adam-h wants to merge 1 commit intobasecamp:mainfrom
polleverywhere:ah/sync-0.8-beta

Conversation

@adam-h
Copy link
Copy Markdown

@adam-h adam-h commented Mar 5, 2026

In order for ol list elements to respect the numbers they were authored with we need to make sure that the start attribute makes it through dom_purify and the ActionText allowlist.

In order for `ol` list elements to respect the numbers they were authored with we need to make sure that the `start` attribute makes it through dom_purify and the ActionText allowlist.
Copilot AI review requested due to automatic review settings March 5, 2026 03:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ensures <ol start="…"> survives both DOMPurify and ActionText sanitization so authored ordered list numbering is preserved when loading HTML.

Changes:

  • Added a system test asserting start is retained on ordered lists.
  • Added start to the DOMPurify allowed attribute list.
  • Added start to ActionText’s allowed attributes in the engine initializer.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/system/load_html_test.rb Adds coverage to confirm ol[start] is preserved when loading editor HTML.
src/config/dom_purify.js Allows the start attribute through DOMPurify.
lib/lexxy/engine.rb Allows the start attribute through ActionText’s sanitizer allowlist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adam-h
Copy link
Copy Markdown
Author

adam-h commented Mar 6, 2026

Apologies, this is a dupe #713

@adam-h adam-h closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants