Skip to content

fix(result-word-highlight): input ending in < shows a broken entity (@boergeson) - #8378

Open
boergeson wants to merge 2 commits into
monkeytypegame:masterfrom
boergeson:fix/escape-input-word
Open

fix(result-word-highlight): input ending in < shows a broken entity (@boergeson)#8378
boergeson wants to merge 2 commits into
monkeytypegame:masterfrom
boergeson:fix/escape-input-word

Conversation

@boergeson

Copy link
Copy Markdown
Contributor

Description

The result word highlight escaped < and > as &lt/&gt and then sliced the string to the word length, so an input ending in < got cut in the middle of the entity. Hovering the chart then showed abc& for a typed abc<.

Slice first, then run it through Misc.escapeHTML. Same helper is now used for the words history hover, that one was fine in practice since it isnt sliced, but it had the same handwritten replace chain.

Checked with playwright against vite dev, custom text xyz typed as abc<: master shows abc& in the chart highlight, this branch shows abc<.

Closes #8365

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: HTML entity replacements missing semicolons (&lt/&gt) — sliced entities render as garbage text in typed-word overlay

2 participants