GeezerVison is showing github.com — doc: update url doc to account for escaping · nodejs/node@8929445
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/url.markdown +11Lines changed: 11 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
5 | 5 | This module has utilities for URL resolution and parsing. |
6 | 6 | Call `require('url')` to use it. |
7 | 7 |
|
| 8 | +## URL Parsing |
| 9 | + |
8 | 10 | Parsed URL objects have some or all of the following fields, depending on |
9 | 11 | whether or not they exist in the URL string. Any parts that are not in the URL |
10 | 12 | string will not be in the parsed object. Examples are shown for the URL |
@@ -64,6 +66,15 @@ string will not be in the parsed object. Examples are shown for the URL |
64 | 66 |
|
65 | 67 | Example: `'#hash'` |
66 | 68 |
|
| 69 | +### Escaped Characters |
| 70 | + |
| 71 | +Spaces (`' '`) and the following characters will be automatically escaped in the |
| 72 | +properties of URL objects: |
| 73 | + |
| 74 | + < > " ` \r \n \t { } | \ ^ ' |
| 75 | + |
| 76 | +--- |
| 77 | + |
67 | 78 | The following methods are provided by the URL module: |
68 | 79 |
|
69 | 80 | ## url.parse(urlStr[, parseQueryString][, slashesDenoteHost]) |
|