From 81ec7c6cd471c17ae1387e18876f0baa78dc4dfd Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Sat, 9 May 2026 12:59:09 +1000 Subject: [PATCH] fix(core/issues-notes): warn about githubusercontent images in issues GitHub issue bodies often contain images hosted on user-images.githubusercontent.com. These URLs are rejected by W3C publication tools (pubrules). Warn spec authors so they can download and self-host the images. Closes #3825 --- src/core/issues-notes.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/issues-notes.js b/src/core/issues-notes.js index d7b238d59d..36ad331f1a 100644 --- a/src/core/issues-notes.js +++ b/src/core/issues-notes.js @@ -190,6 +190,15 @@ function handleIssues(ins, ghIssues, conf) { body = document .createRange() .createContextualFragment(ghIssue.bodyHTML); + const externalImages = /** @type {NodeListOf} */ ( + body.querySelectorAll("img[src*='githubusercontent.com']") + ); + if (externalImages.length) { + const msg = `Issue #${dataNum} contains images hosted on githubusercontent.com which may be rejected by W3C publication tools.`; + const hint = + "Download the images and host them alongside the spec source."; + showWarning(msg, name, { hint }); + } } div.append(titleParent, body); }