Replacement strings built from file content expand `$` patterns
Version: 8.761.0.
What happens. String.prototype.replace treats $&, $`, $', $$ and $n in a replacement STRING as patterns. LIFEOS/TOOLS/ISARender.ts fills 14 of its 17 template slots with replacement strings, most of them carrying ISA text ({{SECTIONS}} and the two {{RUNTIME_*}} slots already use function replacers; ISARender.ts:1105-1121), and TelosFreshness.ts upsertFrontmatterLine (:479) does the same with any frontmatter value, so content containing one of those sequences is mangled. Repro on 8.761.0: an ISA whose task is Budget $& review renders <title>Budget {{TITLE}}amp; review</title>, and {{TASK}}amp; appears in the page (escapeHtml turns $& into $&, and $& then expands to the matched slot name).
Suggested fix. Pass a function replacer (() => value) wherever the replacement comes from content.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks @Luo0oo, you found that replacement strings built from file content expanded $ patterns such as $&. The ISARender template fill and upsertFrontmatterLine now use function replacers so the text goes in literally, and a regression test covers $&, in LIFEOS/TOOLS/ISARender.ts. It ships in the next public release after 8.761.0.