fix(bundle): stop pre-escaping gym name in embedded dom.js (apostrophe fix)
The embedded currentAttribute() in the bundle was returning gym: tatEsc(gym), but the render template in Dialog.render also escapes with tatEsc(s.gym). The double-escape turned 'George's' into 'George&#39;s', which the browser decoded to the visible text 'George's'. The src/dom.js source does NOT pre-escape (returns the raw gym string and lets the render template handle escaping once). This commit restores the mirror in the embedded dom.js so the bundle matches the source. No changes to src/dom.js (it was already correct). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
const current = tatExtractValueFromLi(li);
|
||||
if (current == null) return null;
|
||||
const gym = tatFindGymName() || 'Unknown gym';
|
||||
return { attr: attr, current: current, gym: tatEsc(gym) };
|
||||
return { attr: attr, current: current, gym: gym };
|
||||
}
|
||||
function tatFindActiveAttributeLi() {
|
||||
// Priority 1: the <li> with the "success" class (just trained).
|
||||
@@ -276,7 +276,8 @@
|
||||
// ===== ui.js (embedded) =====
|
||||
const TAT_STYLE = `
|
||||
.tat-root { position: fixed; z-index: 99999; min-width: 320px; max-width: 420px; background: #2b2b2b; color: #ddd; border: 1px solid #444; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); font: 13px/1.4 Tahoma, Verdana, sans-serif; padding: 12px 14px; }
|
||||
.tat-root.tat-anchored { position: static; margin: 0 auto 12px; max-width: 720px; box-shadow: none; }
|
||||
.tat-root.tat-anchored { position: static; margin: 0 0 12px 0; max-width: none; box-shadow: none; border-radius: 0; border: 1px solid #444; border-top: 2px solid #c00; padding: 16px 20px; }
|
||||
.tat-root.tat-anchored .tat-header { cursor: default; }
|
||||
.tat-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #444; cursor: move; user-select: none; }
|
||||
.tat-header strong { color: #fff; }
|
||||
.tat-close { cursor: pointer; opacity: 0.6; padding: 0 4px; }
|
||||
|
||||
Reference in New Issue
Block a user