Skip to content

Make the HTML output more compatible with XHTML - #24

Open
McSinyx wants to merge 2 commits into
jgm:mainfrom
McSinyx:xhtml
Open

Make the HTML output more compatible with XHTML#24
McSinyx wants to merge 2 commits into
jgm:mainfrom
McSinyx:xhtml

Conversation

@McSinyx

@McSinyx McSinyx commented May 2, 2026

Copy link
Copy Markdown

Namely with self-closing tags and without entity references

@McSinyx
McSinyx marked this pull request as draft May 2, 2026 13:11
McSinyx added 2 commits May 2, 2026 22:21
XML only defines four entities (< > & ") out of the box, so for XHTML
embedded in Atom feeds, HTML entities don't come in DOCTYPE
and need to be defined inlined.  Therefore, character references
are now used instead of entity references, making the output
directly embeddable as XHTML in Atom entries.

References: https://www.w3.org/TR/REC-xml/#sec-references
@McSinyx
McSinyx marked this pull request as ready for review May 2, 2026 13:21
@catwell

catwell commented May 2, 2026

Copy link
Copy Markdown

Something like this would be nice for ATOM feeds for instance. I have hacks like this in my blog generator because of it.

@McSinyx

McSinyx commented May 2, 2026

Copy link
Copy Markdown
Author

Yes it's for that exact reason (see the commit messages), I'm basically upstreaming these monkey patches.

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.

2 participants