Skip to content

escape regex special characters in location prefix stripping#21436

Open
rootvector2 wants to merge 1 commit into
emberjs:mainfrom
rootvector2:escape-location-prefix-regex
Open

escape regex special characters in location prefix stripping#21436
rootvector2 wants to merge 1 commit into
emberjs:mainfrom
rootvector2:escape-location-prefix-regex

Conversation

@rootvector2
Copy link
Copy Markdown

HistoryLocation.getURL builds its prefix-stripping RegExp by interpolating rootURL and the baseURL read from the page's directly, so a rootURL like /app.v2/ over-strips /appXv2/posts and a base href containing [ makes getURL throw. Run both through escapeRegExp so the prefix matches literally; NoneLocation.getURL had the same unescaped rootURL.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant