Skip to content

Commit bc62857

Browse files
Fix apostrophe encoding in chapter names (issue #181) (#182)
The clean_pgn() function unescaped > and " HTML entities but was missing ' (apostrophe), causing chapter names like "King's English" to display as "King's English" in the sidebar. https://claude.ai/code/session_01RGwiXshb2J84P5QQxDzGjr
1 parent 5967597 commit bc62857

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/listudy_web/templates/study/show.html.eex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
pgn = pgn.replace(/>/g, '>');
111111
pgn = pgn.replace(/&lt;/g, '<');
112112
pgn = pgn.replace(/&quot;/g, '"');
113+
pgn = pgn.replace(/&#39;/g, "'");
113114
// U+FEFF ZERO WIDTH NO-BREAK SPACE
114115
// No idea why they are in some pgns but they break the parser
115116
// https://github.com/ArneVogel/listudy/issues/35

0 commit comments

Comments
 (0)