-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
doc, url: various improvements to WHATWG API #11330
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
doc/api/url.md
Outdated
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.
Probably "as percent-encoded strings" or "as a string of percent-encoded characters", or even "percent-encoded bytes"? "a percent-encoded string" sounds a bit weird given that they would be not just be encoded but also joined with &
and =
s.
Another way to explain it would be to mention that it is somewhat similar to querystring.stringify()
.
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.
How about:
-Returns the search parameters serialized as a URL-encoded string.
+Returns the search parameters serialized as a string, with characters
+percent-encoded where necessary.
doc/api/url.md
Outdated
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.
nit: "does not allow users to customize the.." seems easier to read?
doc/api/url.md
Outdated
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.
nit: "Below it"?(as opposed to "Above it")
doc/api/url.md
Outdated
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 know it's already there but technically, doesn't url.parse()
percent-decode things..?
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.
url.parse()
also encodes certain things:
> url.parse('http://\n.com').pathname
'%0A.com'
7a14576
to
424ec4f
Compare
PR-URL: #11330 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Also remove executable bit from doc/api/url.md's mode. PR-URL: #11330 Fixes: 4757ddc "doc: add basic documentation for WHATWG URL API" Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Also remove executable bit from doc/api/url.md's mode. Backport-of: nodejs#11330 Fixes: 84e2ff3 "doc: add basic documentation for WHATWG URL API"
Also remove executable bit from doc/api/url.md's mode. Backport-of: nodejs#11330 Fixes: 84e2ff3 "doc: add basic documentation for WHATWG URL API"
Checklist
Affected core subsystem(s)
doc, url