diff --git a/packages/extension-firefox/manifest.json b/packages/extension-firefox/manifest.json index 3e6810b..d240d20 100644 --- a/packages/extension-firefox/manifest.json +++ b/packages/extension-firefox/manifest.json @@ -37,7 +37,7 @@ "browser_specific_settings": { "gecko": { "id": "gitmarks@paperhurts.dev", - "strict_min_version": "121.0", + "strict_min_version": "140.0", "data_collection_permissions": { "required": ["bookmarksInfo"] } diff --git a/packages/extension-shared/src/popup.ts b/packages/extension-shared/src/popup.ts index 83f05ad..96ed004 100644 --- a/packages/extension-shared/src/popup.ts +++ b/packages/extension-shared/src/popup.ts @@ -62,12 +62,18 @@ async function render(): Promise { return; } + // Static template only — the tab title is set via textContent below so no + // dynamic value ever reaches innerHTML (AMO flags any interpolated + // innerHTML, issue #75). root!.innerHTML = ` -

${escapeText(tab.title ?? tab.url)}

+

`; + const titleEl = root!.querySelector(".title")!; + titleEl.textContent = tab.title ?? tab.url; + titleEl.title = tab.title ?? tab.url; const errStored = await browser.storage.local.get("gitmarks:lastError"); const lastErr = errStored["gitmarks:lastError"] as LastErrorRecord | undefined; @@ -170,17 +176,6 @@ async function render(): Promise { }); } -function escapeText(s: string): string { - return s - .replace(/&/g, "&") - .replace(//g, ">"); -} - -function escapeAttr(s: string): string { - return escapeText(s).replace(/"/g, """); -} - render().catch((err) => { console.error("[gitmarks] popup render failed", err); if (root != null) {