Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Closed
wants to merge 1 commit into from

Conversation

lazyhammer
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #7219
License MIT
Doc PR n/a

Added relative path translation according to RFC 3986, section 5.2.4

}
}

return join('/', $output);
Copy link
Member

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

Copy link
Contributor Author

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)
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@vicb
Copy link
Contributor

vicb commented Mar 2, 2013

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.

@lazyhammer
Copy link
Contributor Author

Ok, I'll submit a new PR.

@lazyhammer lazyhammer closed this Mar 2, 2013
@lazyhammer
Copy link
Contributor Author

Sent to 2.1, new PR #7244.

@lazyhammer lazyhammer deleted the crawler-relative-links branch March 8, 2013 15:02
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.

3 participants