What happens
Selecting transcript text and using "Copy to clipboard" mangles apostrophes: a transcript reading There's this other space is copied — and shown in the confirmation dialog — as There`s this other space.
Cause
hyperaudio-lite.js:481, in setupPopover():
this.selectionText = selection.toString().replaceAll("'", "`");
selectionText is used in exactly one place (line 506):
let cbText = `${this.selectionText} ${document.location}`;
navigator.clipboard.writeText(cbText);
document.getElementById("clipboard-text").textContent = cbText;
Both clipboard.writeText() and textContent accept arbitrary strings, so nothing here needs apostrophes escaped.
The substitution looks inherited from js/share-this-clipboard.js, which does the same thing — but there it is necessary, because that sharer builds an inline handler (onclick="…writeText('…')…") in which a raw apostrophe would terminate the string literal. Moving the feature into the library replaced that mechanism with an event listener, and the escaping should have gone with it.
Suggested fix
this.selectionText = selection.toString();
Why it matters
The people most likely to use select-to-copy are quoting speech — journalists, researchers, archivists — and a quotation with backticks for apostrophes is unusable without hand-repair. Since pages load the library unpinned from the CDN, fixing it upstream repairs every transcript already exported.
What happens
Selecting transcript text and using "Copy to clipboard" mangles apostrophes: a transcript reading
There's this other spaceis copied — and shown in the confirmation dialog — asThere`s this other space.Cause
hyperaudio-lite.js:481, insetupPopover():selectionTextis used in exactly one place (line 506):Both
clipboard.writeText()andtextContentaccept arbitrary strings, so nothing here needs apostrophes escaped.The substitution looks inherited from
js/share-this-clipboard.js, which does the same thing — but there it is necessary, because that sharer builds an inline handler (onclick="…writeText('…')…") in which a raw apostrophe would terminate the string literal. Moving the feature into the library replaced that mechanism with an event listener, and the escaping should have gone with it.Suggested fix
Why it matters
The people most likely to use select-to-copy are quoting speech — journalists, researchers, archivists — and a quotation with backticks for apostrophes is unusable without hand-repair. Since pages load the library unpinned from the CDN, fixing it upstream repairs every transcript already exported.