-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: escape everything with modified QueryEscape
This commit switches to using `QueryEscape` for escaping all components. However, because `QueryEscape` escapes ` ` (space) to `+`, we actually change that to a `%20`, that is the percent-encoded equivalent. `QueryEscape` was built for HTTP Query parameters, and although there is [some discussion](https://stackoverflow.com/questions/2678551/when-should-space-be-encoded-to-plus-or-20) around it, escaping ` ` to a `+` is completely valid. Sadly, other languages like Javascript don't handle that properly, so if we simply used `QueryEscape`, the purl couldn't be parsed by other implementations. By using the universally supported `%20` instead, we restore compatibility.
- Loading branch information
1 parent
3587d8c
commit 352a619
Showing
2 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters