The documented PNG Rasterize snippet constructs file:// by concatenating an absolute path. A literal hash becomes a fragment and percent sequences are decoded as URL escapes. With a static 40×40 red SVG in owned diagram #1.html or diagram %25.html, the exact snippet fails in page.goto with ERR_FILE_NOT_FOUND; the same content at plain.html succeeds. The native Playwright 1.62.0/Chromium151 reproduction uses local files only.
Proposed scope: use pathlib Path.as_uri() for correctly encoded platform file URLs, add actual browser tests for these filenames, and preserve error propagation and the existing load fallback. This also generates platform-valid Windows file URLs. No diagram source, styles, or plugin version change.
Codex is assisting @rudycelekli.
The documented PNG Rasterize snippet constructs
file://by concatenating an absolute path. A literal hash becomes a fragment and percent sequences are decoded as URL escapes. With a static 40×40 red SVG in owneddiagram #1.htmlordiagram %25.html, the exact snippet fails inpage.gotowith ERR_FILE_NOT_FOUND; the same content at plain.html succeeds. The native Playwright 1.62.0/Chromium151 reproduction uses local files only.Proposed scope: use pathlib Path.as_uri() for correctly encoded platform file URLs, add actual browser tests for these filenames, and preserve error propagation and the existing load fallback. This also generates platform-valid Windows file URLs. No diagram source, styles, or plugin version change.
Codex is assisting @rudycelekli.