Skip to content

Fix inline <code> escaping in reference pages#1164

Open
rakesh2OO5 wants to merge 2 commits intoprocessing:mainfrom
rakesh2OO5:fix/issue-lt-gt
Open

Fix inline <code> escaping in reference pages#1164
rakesh2OO5 wants to merge 2 commits intoprocessing:mainfrom
rakesh2OO5:fix/issue-lt-gt

Conversation

@rakesh2OO5
Copy link
Contributor

@rakesh2OO5 rakesh2OO5 commented Feb 11, 2026

Fixes #1163

Escaping was not being lost during reference data generation (confirmed in the main p5.js repo). The generated docs/reference/data.json already contains properly escaped HTML.

The issue occurred during rendering in p5.js-website, where inline code containing HTML was being reinterpreted and losing escaped entities.

This PR enables xmlMode in Cheerio within escapeCodeTagsContent to ensure escaped entities inside inline code are preserved.

Multiline pre/code blocks remain unaffected.

Tested locally on affected reference pages including createDiv, attribute, center, and child.

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.

Some reference entries do not display &lt; &gt; as expected

1 participant