Repository navigation
Conversation
What was broken The Marathon Match Local Tester Parameters article displayed literal < and > entity names in its javac and jar command examples. Root cause Community App still serves the public article. Its Markdown renderer passed decoded text tokens through the HTML sanitizer before React escaped them again, producing double-escaped angle brackets. What was changed Pass parsed text tokens directly to React so they are escaped exactly once. Update the renderer documentation to explain text handling. Keep the fix limited to Community App's text-token path and its regression tests. Any added/updated tests Add DOM and serialized-HTML regressions for the article's two commands, literal entity names, and escaped script/image examples remaining text. Verified the command regression fails before the fix. Validation: npm test passed, including JavaScript/SCSS lint, the retired-CMS target check, 456 tests, and 141 snapshots (23 existing test skips). npm run build and git diff --check passed using Node v10.24.1 via nvm use.
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.
What was broken
The Marathon Match Local Tester Parameters article displayed
<and>instead of angle brackets in its compilation commands. For example, readers sawjavac <TesterClassName>.javainstead ofjavac <TesterClassName>.java.Root cause
The public article is currently served by Community App, as confirmed by its response HTML and script assets. Its Markdown renderer passed decoded text through the HTML sanitizer before React escaped it again, generating
&lt;and&gt;in the output HTML.What was changed
Pass parsed text tokens directly to React so they are escaped exactly once, and document why this is safe for text content. The fix is confined to the text-token path; it does not decode entity strings recursively or insert raw HTML.
Files modified:
src/shared/utils/markdown.js__tests__/shared/utils/markdown.jsAny added/updated tests
Added three regression tests covering the article's javac/jar commands in rendered DOM and serialized HTML, literal entity names, and escaped script/image examples remaining inactive text. The command regression reproduced the screenshot before the fix. Existing snapshots did not change.
Validation used
nvm use(Node v10.24.1):npm testpassed, including JavaScript/SCSS lint and the retired-CMS network-target check: 168 passing suites, 456 passing tests, and 141 passing snapshots. The suite retains its 4 skipped suites and 23 skipped tests.npm run buildpassed.git diff --checkpassed.