nook: decode hex apostrophe entities in release notes
Settings > Changelog and /changelog showed literal ' wherever a bullet had an apostrophe: embed_release_notes.py escapes appcast descriptions with Python's html.escape, which prefers the hex form for apostrophes, and decodeEntities only knew the decimal ' — so the entity survived into releases.json and was rendered as-is. Add ' (and ') to the replacement table. Tests: new sectionsFromHtml case pinning html.escape-style output; fails without the fix, full suite otherwise matches master. Co-Authored-By: glm-5.3-flash <noreply@z.ai> NOOK-565
This commit is contained in:
@@ -35,7 +35,11 @@ const ENTITY_REPLACEMENTS: [RegExp, string][] = [
|
||||
[/</g, "<"],
|
||||
[/>/g, ">"],
|
||||
[/"/g, '"'],
|
||||
// Python's html.escape, which embed_release_notes.py writes the appcast
|
||||
// with, prefers the hex form for apostrophes (NOOK-565).
|
||||
[/'/g, "'"],
|
||||
[/'/g, "'"],
|
||||
[/'/g, "'"],
|
||||
[/ /g, " "],
|
||||
// Last, so "&lt;" cannot decode twice.
|
||||
[/&/g, "&"]
|
||||
|
||||
Reference in New Issue
Block a user