Title: Hyperlink should treat + in query as %20 · Issue #129 · python-hyper/hyperlink · GitHub
Open Graph Title: Hyperlink should treat + in query as · Issue #129 · python-hyper/hyperlink
X Title: Hyperlink should treat + in query as · Issue #129 · python-hyper/hyperlink
Description: Via twisted/klein#339, Hyperlink seems to be percent-encoding the + when parsing the URL: >>> from hyperlink import parse >>> u = parse(b"https://localhost/getme?name=hello, big+world&value=4321".decode('ascii')) >>> u DecodedURL(url=U...
Open Graph Description: Via twisted/klein#339, Hyperlink seems to be percent-encoding the + when parsing the URL: >>> from hyperlink import parse >>> u = parse(b"https://localhost/getme?name=hello, big+world&value=4321"...
X Description: Via twisted/klein#339, Hyperlink seems to be percent-encoding the + when parsing the URL: >>> from hyperlink import parse >>> u = parse(b"https://localhost/getme?name=hello,%...
Mail addresses
glyph@twistedmatrix.com
glyph@twistedmatrix.com
Opengraph URL: https://github.com/python-hyper/hyperlink/issues/129
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Hyperlink should treat + in query as %20","articleBody":"Via https://github.com/twisted/klein/issues/339, Hyperlink seems to be percent-encoding the `+` when parsing the URL:\r\n\r\n```py\r\n>>> from hyperlink import parse\r\n>>> u = parse(b\"https://localhost/getme?name=hello,%20big+world&value=4321\".decode('ascii'))\r\n>>> u\r\nDecodedURL(url=URL.from_text('https://localhost/getme?name=hello,%20big%2Bworld&value=4321'))\r\n>>> u.to_uri().to_text().encode('ascii')\r\nb'https://localhost/getme?name=hello,%20big%2Bworld&value=4321'\r\n```\r\n\r\nThis seems like a bug to me. `+` in the query part should be treated like `%20`. For example, this is what the [web API](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams) does:\r\n\r\n```js\r\nu = new URL(\"https://localhost/getme?name=hello,%20big+world&value=4321\");\r\nconsole.log(u.searchParams.get(\"name\"));\r\n// outputs: hello, big world\r\n```\r\n\r\n","author":{"url":"https://github.com/twm","@type":"Person","name":"twm"},"datePublished":"2020-04-27T04:35:34Z","url":"https://github.com/python-hyper/hyperlink/issues/129"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:832b87f7-f781-0686-e700-4dcbd59b8cd6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD9A:326E70:558307:75F605:6B06EA1B |
| html-safe-nonce | ed1202b31b0131366e908d4b1dda33c05cca3ea8faa548b7eb56d1237bd84696 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDlBOjMyNkU3MDo1NTgzMDc6NzVGNjA1OjZCMDZFQTFCIiwidmlzaXRvcl9pZCI6IjE1MDY0Mjk1NDQyOTc4NTE0MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bc24da07c73ab18194704c4e55419dd56e6ecd55734836a760b9bdfdb07e1957 |
| hovercard-subject-tag | issue:607225417 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-hyper/hyperlink/129/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1535de46f77a077a854afc598987072cce6242e46de6da1d2e1d93bd5cd3ac0a/python-hyper/hyperlink/issues/129 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1535de46f77a077a854afc598987072cce6242e46de6da1d2e1d93bd5cd3ac0a/python-hyper/hyperlink/issues/129 |
| og:image:alt | Via twisted/klein#339, Hyperlink seems to be percent-encoding the + when parsing the URL: >>> from hyperlink import parse >>> u = parse(b"https://localhost/getme?name=hello, big+world&value=4321"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | twm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/hyperlink git https://github.com/python-hyper/hyperlink.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 82321340 |
| octolytics-dimension-repository_nwo | python-hyper/hyperlink |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82321340 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/hyperlink |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af8913cd0f2f77c41796be449ac66a9108825abc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width