Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 02b722e

Browse files
doc: add explanations for querystring
- add an article: `decode a non-utf8 string` - explain default behaviour of `querystring.unescape` - add a note that the baviour can change if other folks on your team have overridden it related to #9207 Conflicts: doc/api/querystring.markdown
1 parent 6719c4a commit 02b722e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/api/querystring.markdown

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Options object may contain `maxKeys` property (equal to 1000 by default), it'll
4343
be used to limit processed keys. Set it to 0 to remove key count limitation.
4444

4545
Options object may contain `decodeURIComponent` property (`querystring.unescape` by default),
46-
it can be used to decode `non-utf8` encoding string if necessary.
46+
it can be used to decode a `non-utf8` encoding string if necessary.
4747

4848
Example:
4949

@@ -67,3 +67,7 @@ provided so that it could be overridden if necessary.
6767

6868
The unescape function used by `querystring.parse`,
6969
provided so that it could be overridden if necessary.
70+
71+
It will try to use `decodeURIComponent` in the first place,
72+
but if that fails it falls back to a safer equivalent that
73+
doesn't throw on malformed URLs.

0 commit comments

Comments
 (0)