Skip to content

Fix inline HTML case - #1649

Merged
waylan merged 2 commits into
Python-Markdown:masterfrom
facelessuser:inline-html
Oct 3, 2026
Merged

waylan merged 2 commits into
Python-Markdown:masterfrom
facelessuser:inline-html

Conversation

@facelessuser

@facelessuser facelessuser commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

HTML handling is inconsistent. In some places it allows < and > in attributes, and in other places rejects it.

The HTML spec allows for these in attributes, and browsers will escape them. While it is generally recommended that users escape < and >, it is not explicitly required.

If the attribute is quoted, it should allow < and >.

Update regex pattern to allow attributes with angled brackets and use possessive quantifiers for performance as we are now only supporting Python 3.10+.

Fixes #1647

Description

AI Assistance Disclosure

  • No AI tools were used in preparing this PR.
  • If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.

Checklist

HTML handling is inconsistent. In some places it allows `<` and `>` in
attributes, and in other places rejects it.

The HTML spec allows for these in attributes, and browsers will escape
them. While it is generally recommended that users escape `<` and `>`,
it is not explicitly required.

If the attribute is quoted, it should allow `<` and `>`.

Update regex pattern to allow attributes with angled brackets and use
possessive quantifiers to performance as we are now only supporting
Python 3.10+.

Fixes Python-Markdown#1647
@facelessuser
facelessuser marked this pull request as ready for review October 3, 2026 13:22
@waylan
waylan merged commit 7a29324 into Python-Markdown:master Oct 3, 2026
14 checks passed
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.11 doesn't accept tag properties containing html strings anymore

2 participants