-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DomCrawler] Fix relative path handling in links #7240
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
Conversation
} | ||
} | ||
|
||
return join('/', $output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use implode
for consistency with the existing codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Added relative path translation according to RFC 3986, section 5.2.4
* | ||
* @return string | ||
*/ | ||
protected function removeDotSegments($path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"remove" does not sound right to me (in the comments also)
what about canonicalizePath
or getRealPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canonicalize or normalize looks good to me.. what would you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go for the first one - but no strong prefs. Thanks.
Oh and as a bug fix this PR should be based on the earliest branch where the defect appears (2.0, 2.1 or 2.2). You will also need to close this PR and resend another one targeting the correct base branch. Thanks. |
Ok, I'll submit a new PR. |
Sent to 2.1, new PR #7244. |
Added relative path translation according to RFC 3986, section 5.2.4