Skip to content

don't percent encoding the url#487

Open
hanyang-tony wants to merge 1 commit intomigueldeicaza:mainfrom
hanyang-tony:main
Open

don't percent encoding the url#487
hanyang-tony wants to merge 1 commit intomigueldeicaza:mainfrom
hanyang-tony:main

Conversation

@hanyang-tony
Copy link
Contributor

NSURL handles that itself, percent encoding whole url is not allowed.

from: https://developer.apple.com/documentation/foundation/nsstring/addingpercentencoding(withallowedcharacters:)

Entire URL strings cannot be percent-encoded, because each URL component specifies a different set of allowed characters.

Encoding the url with query character set will cause url anchor to be invalid. For example, https://github.com/migueldeicaza/SwiftTerm/blob/main/README.md?plain=1#L11 becomes https://github.com/migueldeicaza/SwiftTerm/blob/main/README.md?plain=1%23L11

NSURL handles that itself, percent encoding whole url is not allowed
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