Fix double escaping and decode HTML entities in backticks for command documentation#613
Merged
Merged
Conversation
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
…d files Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix incorrect rendering of taxonomy documentation
Fix HTML entity rendering in command documentation parameter placeholders
Jan 7, 2026
Member
|
@copilot I think the issue is actually some double escaping. Revert your changes. Then, make sure |
Per @swissspidy's feedback, the issue is double escaping. Changed the generator to convert &lt; back to < and &gt; back to > to prevent double escaping. - Reverted all markdown files to original state with <slug> - Added fix to prevent &lt; from being created by converting it back to < - Removed previous fix that was converting < to < Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Fix HTML entity rendering in command documentation parameter placeholders
Fix double escaping of HTML entities in command documentation generator
Jan 7, 2026
Member
|
@copilot I think what we need to do is to decode HTML entities inside backticks. So that we for example have ``--theme= |
Per @swissspidy's feedback, HTML entities inside backticks should be decoded so that `--theme=<theme>` becomes `--theme=<theme>`. Added preg_replace_callback to decode HTML entities within backtick-enclosed code spans using html_entity_decode(). Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Contributor
Author
Done. Added regex to decode HTML entities inside backticks using |
Copilot
AI
changed the title
Fix double escaping of HTML entities in command documentation generator
Fix double escaping and decode HTML entities in backticks for command documentation
Jan 8, 2026
swissspidy
reviewed
Jan 8, 2026
swissspidy
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Command documentation generator was double-escaping HTML entities and not decoding them inside backtick-enclosed code spans, causing incorrect rendering in generated files.
Changes
Generator fixes (
bin/Handbook_Command.php)&lt;back to<and&gt;back to>htmlspecialchars()processes content that already contains entitiespreg_replace_callbackto find backtick-enclosed code spanshtml_entity_decode()`--theme=<theme>`renders correctly instead of`--theme=<theme>`Problem
<slug>(HTML entities), thehtmlspecialchars()call on line 609 converts the&in<to&, resulting in&lt;slug&gt;(double-escaped) in the output.<theme>instead of<theme>in inline code.Impact
Future documentation generations will:
`--theme=<theme>`instead of`--theme=<theme>`on the websiteOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.