Skip to content

Speculation rules: URL patterns need escaping to work correctly when special characters are present #950

@jeremyroman

Description

@jeremyroman

Bug Description

If WordPress is deployed with an unusual path prefix (notably WordPress Playground uses something like /scope:0.123456/), this isn't properly escaped and the resulting patterns fail to parse.

Steps to reproduce

  1. Go to https://playground.wordpress.net/?plugin=speculation-rules.
  2. Open one of the pages at the top level.
  3. Observe that there are errors in the developer console resulting pages.

Screenshots

n/a

Additional Context

  • PHP Version: 7.4
  • OS: Linux
  • Browser: Chrome (121 beta)
  • Plugin Version: trunk
  • Device: Linux desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Plugin] Performance LabIssue relates to work in the Performance Lab Plugin only[Plugin] Speculative LoadingIssues for the Speculative Loading plugin (formerly Speculation Rules)[Type] BugAn existing feature is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions