Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jeremyroman opened this issue Jan 20, 2024 · 2 comments
Labels
[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Bug An existing feature is broken

Comments

@jeremyroman
Copy link
Contributor

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
@jeremyroman jeremyroman added the [Type] Bug An existing feature is broken label Jan 20, 2024
@jeremyroman
Copy link
Contributor Author

This probably needs the following labels, though I don't think I have permission to apply them:

  • [Focus] JS & CSS
  • [Module] Speculation Rules
  • Performance Lab Plugin

@westonruter westonruter added [Focus] JS & CSS [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) labels Jan 20, 2024
@felixarntz felixarntz added the [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only label Jan 22, 2024
@westonruter
Copy link
Member

Done in #951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Bug An existing feature is broken
Projects
None yet
Development

No branches or pull requests

3 participants