Skip to content

PNG export cannot open legal filenames containing hash or percent characters #298

Description

@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 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions