Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

🐛 Fixed root option trailing slash issue #609

Merged
merged 1 commit into from
May 22, 2017

Conversation

theshem
Copy link
Contributor

@theshem theshem commented May 21, 2017

By setting the root to / the urls would be transformed to //url which will break relative paths and make them absolute URLs unintentionally.

This commit contains trailing slash trimming for the root option, so that concatenating the root+ '/' +url would be safe.


Also checking regex for absolute paths w/ test is more performant than trying to get the matches.

By setting the root to '/' the urls would be transformed to '//...' which will break relative paths and make them absolute URLs unintentionally.

This commit contains trailing slash trimming for the root option, so that concatenating the root+/+url would be safe.
@steffans steffans merged commit 69bb6fd into pagekit:develop May 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants