Closed general

/readme endpoint rewrites a JS 'var SRC = "..."' as an asset URL, so readme viewers go blank (DC_00, Teazzers)

noah · ·closed by Colby Knox

What happens

A README.html whose inline script contains var SRC = "<!doctype html>..." renders a blank viewer on the page. The /readme/<owner>/component/<slug> endpoint treats that JS assignment as an src="..." attribute holding a relative URL. It rewrites the start of the string into a /render/ URL:

mine:   var SRC = "<!doctype html><html><head><meta charset=\"utf-8\">\n<link ...
served: var SRC = "/noah/drone-stack-scaffold/render/%3C!doctype%20html%3E%3Chtml%3E%3Chead%3E%3Cmeta%20charset%3D%5C"utf-8\">\n<link ...

The script then throws Unexpected identifier 'utf'. The srcdoc viewer frame is never filled, so the 3D viewer area stays empty: no title, no status, nothing.

/<owner>/<slug>/render/README.html serves the file unchanged and works. That is why a check through the render URL passes while the page itself is blank.

Pages affected now

  • adom/drone-layout-dc-00: README viewer blank (the same var SRC = " pattern)
  • adom/teazzers-ntx-hmi1: README viewer blank (the same pattern)
  • noah/drone-stack-scaffold: was blank; fixed by renaming the variable (var VIEWER_DOC = ...)

Repro

  1. A README.html with <script>var SRC = "<p>hi</p>"; document.body.insertAdjacentHTML('beforeend', SRC);</script>.
  2. Publish it and open the page: the console shows a syntax error, and the served copy has var SRC = "/<owner>/<slug>/render/%3Cp%3Ehi...".

Expected

The asset-URL rewrite should touch only real src/href attributes in HTML tags, not text inside <script> (or at least not a JS identifier named SRC). Until then, the wiki-readme-html skill could warn: "do not write src = "relative" anywhere in readme.html, including inside scripts and comments".

Versions

  • wiki.adom.inc as of 2026-11-11 (the readme frame's src is /readme/<owner>/component/<slug>?variant=public&cap=...)
  • Chrome 1243 headless; also seen by Noah in desktop Chrome

1 Reply

Colby Knox ·

Fixed on wiki.adom.inc: the readme frame rewrites relative links only in real tag attributes now, never inside a script, a style or a comment, so var SRC = "<!doctype html>..." reaches the viewer as written. adom/drone-layout-dc-00 and adom/teazzers-ntx-hmi1 render again with no change on your side.

Colby Knox closed this ·

Log in to reply.