Found by the review of #327 (#327 (comment)). Each was traced and is safe today; all four are traps for the next change rather than defects.
explorerLink(network, type, value) at src/shared/networks.js:47 is an exported, un-encoded twin of the new explorerUrl() helper. Dead before and after #307, so not a regression — but it undercuts the "one helper that percent-encodes" invariant #307 established, and the next caller who finds it by name gets the unsafe one. Delete it, or make it delegate.
src/popup/views/addressToken.js:202 — ${tokenDecimals} is the only value-shaped bare interpolation left, against the rule #307 writes at the top of helpers.js. Every writer was traced (parseInt/Number, no dApp-writable path into trackedTokens), so it is safe; it is also the one exception a reader will cite as precedent.
src/popup/views/home.js:267 leaves addrTotal bare while src/popup/views/deleteAddress.js:96 escapes the identical formatAddressTotal() output. Both safe, mutually inconsistent — one of them is teaching the wrong lesson.
displaySymbol() slices at a UTF-16 boundary — a 20-emoji symbol truncates onto a lone \ud83d and renders U+FFFD. Cosmetic, but the cap is right next to a security control and should not look sloppy.
Definition of done
explorerLink() is deleted or delegates to explorerUrl(); no un-encoded URL builder remains exported.
Items 2 and 3 escape consistently, so src/popup/views/ has no bare interpolation into an innerHTML string — making the grep in #307's DoD a clean invariant with no exceptions to remember.
displaySymbol() truncates on grapheme or code-point boundaries, never mid-surrogate. Test with an astral-plane symbol.
make check green.
Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/327 (https://git.eeqj.de/sneak/AutistMask/pulls/327#issuecomment-67567). Each was traced and is **safe today**; all four are traps for the next change rather than defects.
1. **`explorerLink(network, type, value)` at `src/shared/networks.js:47`** is an exported, un-encoded twin of the new `explorerUrl()` helper. Dead before and after #307, so not a regression — but it undercuts the "one helper that percent-encodes" invariant #307 established, and the next caller who finds it by name gets the unsafe one. Delete it, or make it delegate.
2. **`src/popup/views/addressToken.js:202`** — `${tokenDecimals}` is the only value-shaped bare interpolation left, against the rule #307 writes at the top of `helpers.js`. Every writer was traced (`parseInt`/`Number`, no dApp-writable path into `trackedTokens`), so it is safe; it is also the one exception a reader will cite as precedent.
3. **`src/popup/views/home.js:267`** leaves `addrTotal` bare while `src/popup/views/deleteAddress.js:96` escapes the identical `formatAddressTotal()` output. Both safe, mutually inconsistent — one of them is teaching the wrong lesson.
4. **`displaySymbol()` slices at a UTF-16 boundary** — a 20-emoji symbol truncates onto a lone `\ud83d` and renders U+FFFD. Cosmetic, but the cap is right next to a security control and should not look sloppy.
## Definition of done
- [ ] `explorerLink()` is deleted or delegates to `explorerUrl()`; no un-encoded URL builder remains exported.
- [ ] Items 2 and 3 escape consistently, so `src/popup/views/` has **no** bare interpolation into an `innerHTML` string — making the grep in #307's DoD a clean invariant with no exceptions to remember.
- [ ] `displaySymbol()` truncates on grapheme or code-point boundaries, never mid-surrogate. Test with an astral-plane symbol.
- [ ] `make check` green.
Built in #459: every value src/popup/views/ writes into innerHTML is now escaped (the two named here, plus the holder count and the USD figures on Home, AddressDetail, AddressToken and each balance row), and displaySymbol() counts code points. Item 1 was already done by #454. The same mid-emoji cut where a symbol is first stored is filed as #458.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/AutistMask/pulls/459: every value `src/popup/views/` writes into `innerHTML` is now escaped (the two named here, plus the holder count and the USD figures on Home, AddressDetail, AddressToken and each balance row), and `displaySymbol()` counts code points. Item 1 was already done by https://git.eeqj.de/sneak/AutistMask/pulls/454. The same mid-emoji cut where a symbol is first stored is filed as https://git.eeqj.de/sneak/AutistMask/issues/458.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the review of #327 (#327 (comment)). Each was traced and is safe today; all four are traps for the next change rather than defects.
explorerLink(network, type, value)atsrc/shared/networks.js:47is an exported, un-encoded twin of the newexplorerUrl()helper. Dead before and after #307, so not a regression — but it undercuts the "one helper that percent-encodes" invariant #307 established, and the next caller who finds it by name gets the unsafe one. Delete it, or make it delegate.src/popup/views/addressToken.js:202—${tokenDecimals}is the only value-shaped bare interpolation left, against the rule #307 writes at the top ofhelpers.js. Every writer was traced (parseInt/Number, no dApp-writable path intotrackedTokens), so it is safe; it is also the one exception a reader will cite as precedent.src/popup/views/home.js:267leavesaddrTotalbare whilesrc/popup/views/deleteAddress.js:96escapes the identicalformatAddressTotal()output. Both safe, mutually inconsistent — one of them is teaching the wrong lesson.displaySymbol()slices at a UTF-16 boundary — a 20-emoji symbol truncates onto a lone\ud83dand renders U+FFFD. Cosmetic, but the cap is right next to a security control and should not look sloppy.Definition of done
explorerLink()is deleted or delegates toexplorerUrl(); no un-encoded URL builder remains exported.src/popup/views/has no bare interpolation into aninnerHTMLstring — making the grep in #307's DoD a clean invariant with no exceptions to remember.displaySymbol()truncates on grapheme or code-point boundaries, never mid-surrogate. Test with an astral-plane symbol.make checkgreen.Built in #459: every value
src/popup/views/writes intoinnerHTMLis now escaped (the two named here, plus the holder count and the USD figures on Home, AddressDetail, AddressToken and each balance row), anddisplaySymbol()counts code points. Item 1 was already done by #454. The same mid-emoji cut where a symbol is first stored is filed as #458.Model: opus-5-5