kea-rails 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kea-rails/version.rb +1 -1
- data/vendor/assets/components/Keypress/LICENSE +191 -0
- data/vendor/assets/components/Keypress/README.md +78 -0
- data/vendor/assets/components/Keypress/bower.json +28 -0
- data/vendor/assets/components/Keypress/keypress-2.1.0.min.js +33 -0
- data/vendor/assets/components/Keypress/keypress.coffee +921 -0
- data/vendor/assets/components/Keypress/keypress.js +1132 -0
- data/vendor/assets/components/Keypress/package.json +15 -0
- data/vendor/assets/components/attachejs/attache-jquery.js +47 -0
- data/vendor/assets/components/attachejs/attache-knockout.js +56 -0
- data/vendor/assets/components/attachejs/attache.css +10 -0
- data/vendor/assets/components/attachejs/attache.js +589 -0
- data/vendor/assets/components/attachejs/bower.json +36 -0
- data/vendor/assets/components/humane-js/bower.json +8 -0
- data/vendor/assets/components/humane-js/changelog.md +165 -0
- data/vendor/assets/components/humane-js/humane.js +238 -0
- data/vendor/assets/components/humane-js/humane.min.js +11 -0
- data/vendor/assets/components/humane-js/index.html +190 -0
- data/vendor/assets/components/humane-js/package.json +25 -0
- data/vendor/assets/components/humane-js/readme.md +85 -0
- data/vendor/assets/components/humane-js/test/issue23.html +11 -0
- data/vendor/assets/components/humane-js/test/issue36.html +9 -0
- data/vendor/assets/components/humane-js/test/issue38.html +15 -0
- data/vendor/assets/components/humane-js/test/issue49.html +9 -0
- data/vendor/assets/components/humane-js/theme-src/bigbox.styl +65 -0
- data/vendor/assets/components/humane-js/theme-src/boldlight.styl +64 -0
- data/vendor/assets/components/humane-js/theme-src/jackedup.styl +69 -0
- data/vendor/assets/components/humane-js/theme-src/libnotify.styl +61 -0
- data/vendor/assets/components/humane-js/theme-src/original.styl +51 -0
- data/vendor/assets/components/humane-js/themes/bigbox.css +123 -0
- data/vendor/assets/components/humane-js/themes/boldlight.css +122 -0
- data/vendor/assets/components/humane-js/themes/flatty.css +94 -0
- data/vendor/assets/components/humane-js/themes/jackedup.css +123 -0
- data/vendor/assets/components/humane-js/themes/libnotify.css +115 -0
- data/vendor/assets/components/humane-js/themes/original.css +72 -0
- data/vendor/assets/components/knockout-sortable/README.md +129 -0
- data/vendor/assets/components/knockout-sortable/bower.json +15 -0
- data/vendor/assets/components/knockout-sortable/build/knockout-sortable.js +358 -0
- data/vendor/assets/components/knockout-sortable/build/knockout-sortable.min.js +2 -0
- data/vendor/assets/components/uri.js/README.md +437 -0
- data/vendor/assets/components/uri.js/URI.jquery.json +38 -0
- data/vendor/assets/components/uri.js/about-uris.html +156 -0
- data/vendor/assets/components/uri.js/build.html +66 -0
- data/vendor/assets/components/uri.js/build.js +78 -0
- data/vendor/assets/components/uri.js/component.json +15 -0
- data/vendor/assets/components/uri.js/contribute.md +11 -0
- data/vendor/assets/components/uri.js/docs.html +1280 -0
- data/vendor/assets/components/uri.js/index.html +173 -0
- data/vendor/assets/components/uri.js/jquery-1.10.2.min.js +6 -0
- data/vendor/assets/components/uri.js/jquery-1.7.2.min.js +4 -0
- data/vendor/assets/components/uri.js/jquery-1.8.2.min.js +2 -0
- data/vendor/assets/components/uri.js/jquery-1.9.1.min.js +5 -0
- data/vendor/assets/components/uri.js/jquery-uri-plugin.html +203 -0
- data/vendor/assets/components/uri.js/package.json +75 -0
- data/vendor/assets/components/uri.js/prettify/lang-apollo.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-clj.js +18 -0
- data/vendor/assets/components/uri.js/prettify/lang-css.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-go.js +1 -0
- data/vendor/assets/components/uri.js/prettify/lang-hs.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-lisp.js +3 -0
- data/vendor/assets/components/uri.js/prettify/lang-lua.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-ml.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-n.js +4 -0
- data/vendor/assets/components/uri.js/prettify/lang-proto.js +1 -0
- data/vendor/assets/components/uri.js/prettify/lang-scala.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-sql.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-tex.js +1 -0
- data/vendor/assets/components/uri.js/prettify/lang-vb.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-vhdl.js +3 -0
- data/vendor/assets/components/uri.js/prettify/lang-wiki.js +2 -0
- data/vendor/assets/components/uri.js/prettify/lang-xq.js +3 -0
- data/vendor/assets/components/uri.js/prettify/lang-yaml.js +2 -0
- data/vendor/assets/components/uri.js/prettify/prettify.css +1 -0
- data/vendor/assets/components/uri.js/prettify/prettify.js +28 -0
- data/vendor/assets/components/uri.js/prettify/prettify.sunburst.css +52 -0
- data/vendor/assets/components/uri.js/screen.css +167 -0
- data/vendor/assets/components/uri.js/screen.js +39 -0
- data/vendor/assets/components/uri.js/src/IPv6.js +185 -0
- data/vendor/assets/components/uri.js/src/SecondLevelDomains.js +220 -0
- data/vendor/assets/components/uri.js/src/URI.fragmentQuery.js +103 -0
- data/vendor/assets/components/uri.js/src/URI.fragmentURI.js +96 -0
- data/vendor/assets/components/uri.js/src/URI.js +1938 -0
- data/vendor/assets/components/uri.js/src/URI.min.js +81 -0
- data/vendor/assets/components/uri.js/src/URITemplate.js +494 -0
- data/vendor/assets/components/uri.js/src/jquery.URI.js +232 -0
- data/vendor/assets/components/uri.js/src/jquery.URI.min.js +7 -0
- data/vendor/assets/components/uri.js/src/punycode.js +508 -0
- data/vendor/assets/components/uri.js/test/index.html +26 -0
- data/vendor/assets/components/uri.js/test/pre_libs.js +4 -0
- data/vendor/assets/components/uri.js/test/qunit/qunit-composite.css +13 -0
- data/vendor/assets/components/uri.js/test/qunit/qunit-composite.js +167 -0
- data/vendor/assets/components/uri.js/test/qunit/qunit.css +244 -0
- data/vendor/assets/components/uri.js/test/qunit/qunit.js +2212 -0
- data/vendor/assets/components/uri.js/test/test.URI.html +26 -0
- data/vendor/assets/components/uri.js/test/test.fragmentQuery.html +31 -0
- data/vendor/assets/components/uri.js/test/test.fragmentURI.html +31 -0
- data/vendor/assets/components/uri.js/test/test.jQuery-1.10.html +31 -0
- data/vendor/assets/components/uri.js/test/test.jQuery-1.7.html +31 -0
- data/vendor/assets/components/uri.js/test/test.jQuery-1.8.html +31 -0
- data/vendor/assets/components/uri.js/test/test.jQuery-1.9.html +31 -0
- data/vendor/assets/components/uri.js/test/test.js +1409 -0
- data/vendor/assets/components/uri.js/test/test_fragmentQuery.js +57 -0
- data/vendor/assets/components/uri.js/test/test_fragmentURI.js +59 -0
- data/vendor/assets/components/uri.js/test/test_jim.js +143 -0
- data/vendor/assets/components/uri.js/test/test_jquery.js +138 -0
- data/vendor/assets/components/uri.js/test/test_template.js +385 -0
- data/vendor/assets/components/uri.js/test/urls.js +1236 -0
- data/vendor/assets/components/uri.js/uri-template.html +234 -0
- data/vendor/assets/components/uri.js/utils/SLDs.php +37 -0
- data/vendor/assets/components/uri.js/utils/sld.js +101 -0
- data/vendor/assets/components/veiljs/bower.json +36 -0
- data/vendor/assets/components/veiljs/veil-jquery.js +47 -0
- data/vendor/assets/components/veiljs/veil-knockout.js +55 -0
- data/vendor/assets/components/veiljs/veil.js +465 -0
- data/vendor/assets/javascripts/fuse.js +472 -0
- data/vendor/assets/javascripts/jquery-ui.js +3844 -0
- data/vendor/assets/javascripts/knockout-3.2.0-debug.js +5299 -0
- data/vendor/assets/javascripts/moment.js +1902 -0
- data/vendor/assets/javascripts/pikaday.js +896 -0
- data/vendor/assets/stylesheets/pikaday.css +171 -0
- metadata +120 -1
@@ -0,0 +1,1236 @@
|
|
1
|
+
var urls = [{
|
2
|
+
name: 'scheme and domain',
|
3
|
+
url: 'http://www.example.org',
|
4
|
+
_url: 'http://www.example.org/',
|
5
|
+
parts: {
|
6
|
+
protocol: 'http',
|
7
|
+
username: null,
|
8
|
+
password: null,
|
9
|
+
hostname: 'www.example.org',
|
10
|
+
port: null,
|
11
|
+
path: '/',
|
12
|
+
query: null,
|
13
|
+
fragment: null
|
14
|
+
},
|
15
|
+
accessors: {
|
16
|
+
protocol: 'http',
|
17
|
+
username: '',
|
18
|
+
password: '',
|
19
|
+
port: '',
|
20
|
+
path: '/',
|
21
|
+
query: '',
|
22
|
+
fragment: '',
|
23
|
+
resource: '/',
|
24
|
+
authority: 'www.example.org',
|
25
|
+
userinfo: '',
|
26
|
+
subdomain: 'www',
|
27
|
+
domain: 'example.org',
|
28
|
+
tld: 'org',
|
29
|
+
directory: '/',
|
30
|
+
filename: '',
|
31
|
+
suffix: '',
|
32
|
+
hash: '', // location.hash style
|
33
|
+
search: '', // location.search style
|
34
|
+
host: 'www.example.org',
|
35
|
+
hostname: 'www.example.org'
|
36
|
+
},
|
37
|
+
is: {
|
38
|
+
urn: false,
|
39
|
+
url: true,
|
40
|
+
relative: false,
|
41
|
+
name: true,
|
42
|
+
sld: false,
|
43
|
+
ip: false,
|
44
|
+
ip4: false,
|
45
|
+
ip6: false,
|
46
|
+
idn: false,
|
47
|
+
punycode: false
|
48
|
+
}
|
49
|
+
}, {
|
50
|
+
name: 'second level domain',
|
51
|
+
url: 'http://www.example.co.uk',
|
52
|
+
_url: 'http://www.example.co.uk/',
|
53
|
+
parts: {
|
54
|
+
protocol: 'http',
|
55
|
+
username: null,
|
56
|
+
password: null,
|
57
|
+
hostname: 'www.example.co.uk',
|
58
|
+
port: null,
|
59
|
+
path: '/',
|
60
|
+
query: null,
|
61
|
+
fragment: null
|
62
|
+
},
|
63
|
+
accessors: {
|
64
|
+
protocol: 'http',
|
65
|
+
username: '',
|
66
|
+
password: '',
|
67
|
+
port: '',
|
68
|
+
path: '/',
|
69
|
+
query: '',
|
70
|
+
fragment: '',
|
71
|
+
resource: '/',
|
72
|
+
authority: 'www.example.co.uk',
|
73
|
+
userinfo: '',
|
74
|
+
subdomain: 'www',
|
75
|
+
domain: 'example.co.uk',
|
76
|
+
tld: 'co.uk',
|
77
|
+
directory: '/',
|
78
|
+
filename: '',
|
79
|
+
suffix: '',
|
80
|
+
hash: '', // location.hash style
|
81
|
+
search: '', // location.search style
|
82
|
+
host: 'www.example.co.uk',
|
83
|
+
hostname: 'www.example.co.uk'
|
84
|
+
},
|
85
|
+
is: {
|
86
|
+
urn: false,
|
87
|
+
url: true,
|
88
|
+
relative: false,
|
89
|
+
name: true,
|
90
|
+
sld: true,
|
91
|
+
ip: false,
|
92
|
+
ip4: false,
|
93
|
+
ip6: false,
|
94
|
+
idn: false,
|
95
|
+
punycode: false
|
96
|
+
}
|
97
|
+
},{
|
98
|
+
name: 'qualified HTTP',
|
99
|
+
url: 'http://www.example.org/some/directory/file.html?query=string#fragment',
|
100
|
+
parts: {
|
101
|
+
protocol: 'http',
|
102
|
+
username: null,
|
103
|
+
password: null,
|
104
|
+
hostname: 'www.example.org',
|
105
|
+
port: null,
|
106
|
+
path: '/some/directory/file.html',
|
107
|
+
query: 'query=string',
|
108
|
+
fragment: 'fragment'
|
109
|
+
},
|
110
|
+
accessors: {
|
111
|
+
protocol: 'http',
|
112
|
+
username: '',
|
113
|
+
password: '',
|
114
|
+
port: '',
|
115
|
+
path: '/some/directory/file.html',
|
116
|
+
query: 'query=string',
|
117
|
+
fragment: 'fragment',
|
118
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
119
|
+
authority: 'www.example.org',
|
120
|
+
userinfo: '',
|
121
|
+
subdomain: 'www',
|
122
|
+
domain: 'example.org',
|
123
|
+
tld: 'org',
|
124
|
+
directory: '/some/directory',
|
125
|
+
filename: 'file.html',
|
126
|
+
suffix: 'html',
|
127
|
+
hash: '#fragment',
|
128
|
+
search: '?query=string',
|
129
|
+
host: 'www.example.org',
|
130
|
+
hostname: 'www.example.org'
|
131
|
+
},
|
132
|
+
is: {
|
133
|
+
urn: false,
|
134
|
+
url: true,
|
135
|
+
relative: false,
|
136
|
+
name: true,
|
137
|
+
sld: false,
|
138
|
+
ip: false,
|
139
|
+
ip4: false,
|
140
|
+
ip6: false,
|
141
|
+
idn: false,
|
142
|
+
punycode: false
|
143
|
+
}
|
144
|
+
}, {
|
145
|
+
name: 'funky suffix',
|
146
|
+
url: 'http://www.example.org/some/directory/file.html-is-awesome?query=string#fragment',
|
147
|
+
parts: {
|
148
|
+
protocol: 'http',
|
149
|
+
username: null,
|
150
|
+
password: null,
|
151
|
+
hostname: 'www.example.org',
|
152
|
+
port: null,
|
153
|
+
path: '/some/directory/file.html-is-awesome',
|
154
|
+
query: 'query=string',
|
155
|
+
fragment: 'fragment'
|
156
|
+
},
|
157
|
+
accessors: {
|
158
|
+
protocol: 'http',
|
159
|
+
username: '',
|
160
|
+
password: '',
|
161
|
+
port: '',
|
162
|
+
path: '/some/directory/file.html-is-awesome',
|
163
|
+
query: 'query=string',
|
164
|
+
fragment: 'fragment',
|
165
|
+
resource: '/some/directory/file.html-is-awesome?query=string#fragment',
|
166
|
+
authority: 'www.example.org',
|
167
|
+
userinfo: '',
|
168
|
+
subdomain: 'www',
|
169
|
+
domain: 'example.org',
|
170
|
+
tld: 'org',
|
171
|
+
directory: '/some/directory',
|
172
|
+
filename: 'file.html-is-awesome',
|
173
|
+
suffix: '',
|
174
|
+
hash: '#fragment',
|
175
|
+
search: '?query=string',
|
176
|
+
host: 'www.example.org',
|
177
|
+
hostname: 'www.example.org'
|
178
|
+
},
|
179
|
+
is: {
|
180
|
+
urn: false,
|
181
|
+
url: true,
|
182
|
+
relative: false,
|
183
|
+
name: true,
|
184
|
+
sld: false,
|
185
|
+
ip: false,
|
186
|
+
ip4: false,
|
187
|
+
ip6: false,
|
188
|
+
idn: false,
|
189
|
+
punycode: false
|
190
|
+
}
|
191
|
+
}, {
|
192
|
+
name: 'complete URL',
|
193
|
+
url: 'scheme://user:pass@www.example.org:123/some/directory/file.html?query=string#fragment',
|
194
|
+
parts: {
|
195
|
+
protocol: 'scheme',
|
196
|
+
username: 'user',
|
197
|
+
password: 'pass',
|
198
|
+
hostname: 'www.example.org',
|
199
|
+
port: '123',
|
200
|
+
path: '/some/directory/file.html',
|
201
|
+
query: 'query=string',
|
202
|
+
fragment: 'fragment'
|
203
|
+
},
|
204
|
+
accessors: {
|
205
|
+
protocol: 'scheme',
|
206
|
+
username: 'user',
|
207
|
+
password: 'pass',
|
208
|
+
port: '123',
|
209
|
+
path: '/some/directory/file.html',
|
210
|
+
query: 'query=string',
|
211
|
+
fragment: 'fragment',
|
212
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
213
|
+
authority: 'user:pass@www.example.org:123',
|
214
|
+
userinfo: 'user:pass',
|
215
|
+
subdomain: 'www',
|
216
|
+
domain: 'example.org',
|
217
|
+
tld: 'org',
|
218
|
+
directory: '/some/directory',
|
219
|
+
filename: 'file.html',
|
220
|
+
suffix: 'html',
|
221
|
+
hash: '#fragment',
|
222
|
+
search: '?query=string',
|
223
|
+
host: 'www.example.org:123',
|
224
|
+
hostname: 'www.example.org'
|
225
|
+
},
|
226
|
+
is: {
|
227
|
+
urn: false,
|
228
|
+
url: true,
|
229
|
+
relative: false,
|
230
|
+
name: true,
|
231
|
+
sld: false,
|
232
|
+
ip: false,
|
233
|
+
ip4: false,
|
234
|
+
ip6: false,
|
235
|
+
idn: false,
|
236
|
+
punycode: false
|
237
|
+
}
|
238
|
+
}, {
|
239
|
+
name: 'badly encoded userinfo',
|
240
|
+
url: 'scheme://user:pass:word@www.example.org/',
|
241
|
+
_url: 'scheme://user:pass%3Aword@www.example.org/',
|
242
|
+
parts: {
|
243
|
+
protocol: 'scheme',
|
244
|
+
username: 'user',
|
245
|
+
password: 'pass:word',
|
246
|
+
hostname: 'www.example.org',
|
247
|
+
port: null,
|
248
|
+
path: '/',
|
249
|
+
query: null,
|
250
|
+
fragment: null
|
251
|
+
},
|
252
|
+
accessors: {
|
253
|
+
protocol: 'scheme',
|
254
|
+
username: 'user',
|
255
|
+
password: 'pass:word',
|
256
|
+
port: '',
|
257
|
+
path: '/',
|
258
|
+
query: '',
|
259
|
+
fragment: '',
|
260
|
+
resource: '/',
|
261
|
+
authority: 'user:pass%3Aword@www.example.org',
|
262
|
+
userinfo: 'user:pass%3Aword',
|
263
|
+
subdomain: 'www',
|
264
|
+
domain: 'example.org',
|
265
|
+
tld: 'org',
|
266
|
+
directory: '/',
|
267
|
+
filename: '',
|
268
|
+
suffix: '',
|
269
|
+
hash: '',
|
270
|
+
search: '',
|
271
|
+
host: 'www.example.org',
|
272
|
+
hostname: 'www.example.org'
|
273
|
+
},
|
274
|
+
is: {
|
275
|
+
urn: false,
|
276
|
+
url: true,
|
277
|
+
relative: false,
|
278
|
+
name: true,
|
279
|
+
sld: false,
|
280
|
+
ip: false,
|
281
|
+
ip4: false,
|
282
|
+
ip6: false,
|
283
|
+
idn: false,
|
284
|
+
punycode: false
|
285
|
+
}
|
286
|
+
}, {
|
287
|
+
name: 'malformed email in userinfo',
|
288
|
+
url: 'scheme://john@doe.com:pass:word@www.example.org/',
|
289
|
+
_url: 'scheme://john%40doe.com:pass%3Aword@www.example.org/',
|
290
|
+
parts: {
|
291
|
+
protocol: 'scheme',
|
292
|
+
username: 'john@doe.com',
|
293
|
+
password: 'pass:word',
|
294
|
+
hostname: 'www.example.org',
|
295
|
+
port: null,
|
296
|
+
path: '/',
|
297
|
+
query: null,
|
298
|
+
fragment: null
|
299
|
+
},
|
300
|
+
accessors: {
|
301
|
+
protocol: 'scheme',
|
302
|
+
username: 'john@doe.com',
|
303
|
+
password: 'pass:word',
|
304
|
+
port: '',
|
305
|
+
path: '/',
|
306
|
+
query: '',
|
307
|
+
fragment: '',
|
308
|
+
resource: '/',
|
309
|
+
authority: 'john%40doe.com:pass%3Aword@www.example.org',
|
310
|
+
userinfo: 'john%40doe.com:pass%3Aword',
|
311
|
+
subdomain: 'www',
|
312
|
+
domain: 'example.org',
|
313
|
+
tld: 'org',
|
314
|
+
directory: '/',
|
315
|
+
filename: '',
|
316
|
+
suffix: '',
|
317
|
+
hash: '',
|
318
|
+
search: '',
|
319
|
+
host: 'www.example.org',
|
320
|
+
hostname: 'www.example.org'
|
321
|
+
},
|
322
|
+
is: {
|
323
|
+
urn: false,
|
324
|
+
url: true,
|
325
|
+
relative: false,
|
326
|
+
name: true,
|
327
|
+
sld: false,
|
328
|
+
ip: false,
|
329
|
+
ip4: false,
|
330
|
+
ip6: false,
|
331
|
+
idn: false,
|
332
|
+
punycode: false
|
333
|
+
}
|
334
|
+
}, {
|
335
|
+
name: 'host-relative: URL',
|
336
|
+
url: '/some/directory/file.html?query=string#fragment',
|
337
|
+
parts: {
|
338
|
+
protocol: null,
|
339
|
+
username: null,
|
340
|
+
password: null,
|
341
|
+
hostname: null,
|
342
|
+
port: null,
|
343
|
+
path: '/some/directory/file.html',
|
344
|
+
query: 'query=string',
|
345
|
+
fragment: 'fragment'
|
346
|
+
},
|
347
|
+
accessors: {
|
348
|
+
protocol: '',
|
349
|
+
username: '',
|
350
|
+
password: '',
|
351
|
+
port: '',
|
352
|
+
path: '/some/directory/file.html',
|
353
|
+
query: 'query=string',
|
354
|
+
fragment: 'fragment',
|
355
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
356
|
+
authority: '',
|
357
|
+
userinfo: '',
|
358
|
+
subdomain: '',
|
359
|
+
domain: '',
|
360
|
+
tld: '',
|
361
|
+
directory: '/some/directory',
|
362
|
+
filename: 'file.html',
|
363
|
+
suffix: 'html',
|
364
|
+
hash: '#fragment',
|
365
|
+
search: '?query=string',
|
366
|
+
host: '',
|
367
|
+
hostname: ''
|
368
|
+
},
|
369
|
+
is: {
|
370
|
+
urn: false,
|
371
|
+
url: true,
|
372
|
+
relative: true,
|
373
|
+
name: false,
|
374
|
+
sld: false,
|
375
|
+
ip: false,
|
376
|
+
ip4: false,
|
377
|
+
ip6: false,
|
378
|
+
idn: false,
|
379
|
+
punycode: false
|
380
|
+
}
|
381
|
+
}, {
|
382
|
+
name: 'path-relative: URL',
|
383
|
+
url: '../some/directory/file.html?query=string#fragment',
|
384
|
+
parts: {
|
385
|
+
protocol: null,
|
386
|
+
username: null,
|
387
|
+
password: null,
|
388
|
+
hostname: null,
|
389
|
+
port: null,
|
390
|
+
path: '../some/directory/file.html',
|
391
|
+
query: 'query=string',
|
392
|
+
fragment: 'fragment'
|
393
|
+
},
|
394
|
+
accessors: {
|
395
|
+
protocol: '',
|
396
|
+
username: '',
|
397
|
+
password: '',
|
398
|
+
port: '',
|
399
|
+
path: '../some/directory/file.html',
|
400
|
+
query: 'query=string',
|
401
|
+
fragment: 'fragment',
|
402
|
+
resource: '../some/directory/file.html?query=string#fragment',
|
403
|
+
authority: '',
|
404
|
+
userinfo: '',
|
405
|
+
subdomain: '',
|
406
|
+
domain: '',
|
407
|
+
tld: '',
|
408
|
+
directory: '../some/directory',
|
409
|
+
filename: 'file.html',
|
410
|
+
suffix: 'html',
|
411
|
+
hash: '#fragment',
|
412
|
+
search: '?query=string',
|
413
|
+
host: '',
|
414
|
+
hostname: ''
|
415
|
+
},
|
416
|
+
is: {
|
417
|
+
urn: false,
|
418
|
+
url: true,
|
419
|
+
relative: true,
|
420
|
+
name: false,
|
421
|
+
sld: false,
|
422
|
+
ip: false,
|
423
|
+
ip4: false,
|
424
|
+
ip6: false,
|
425
|
+
idn: false,
|
426
|
+
punycode: false
|
427
|
+
}
|
428
|
+
}, {
|
429
|
+
name: 'missing scheme',
|
430
|
+
url: 'user:pass@www.example.org:123/some/directory/file.html?query=string#fragment',
|
431
|
+
parts: {
|
432
|
+
protocol: 'user',
|
433
|
+
username: null,
|
434
|
+
password: null,
|
435
|
+
hostname: null,
|
436
|
+
port: null,
|
437
|
+
path: 'pass@www.example.org:123/some/directory/file.html',
|
438
|
+
query: 'query=string',
|
439
|
+
fragment: 'fragment'
|
440
|
+
},
|
441
|
+
accessors: {
|
442
|
+
protocol: 'user',
|
443
|
+
username: '',
|
444
|
+
password: '',
|
445
|
+
port: '',
|
446
|
+
path: 'pass@www.example.org:123/some/directory/file.html',
|
447
|
+
query: 'query=string',
|
448
|
+
fragment: 'fragment',
|
449
|
+
resource: 'pass@www.example.org:123/some/directory/file.html?query=string#fragment',
|
450
|
+
authority: '',
|
451
|
+
userinfo: '',
|
452
|
+
subdomain: '',
|
453
|
+
domain: '',
|
454
|
+
tld: '',
|
455
|
+
directory: '',
|
456
|
+
filename: '',
|
457
|
+
suffix: '',
|
458
|
+
hash: '#fragment',
|
459
|
+
search: '?query=string',
|
460
|
+
host: '',
|
461
|
+
hostname: ''
|
462
|
+
},
|
463
|
+
is: {
|
464
|
+
urn: true,
|
465
|
+
url: false,
|
466
|
+
relative: false,
|
467
|
+
name: false,
|
468
|
+
sld: false,
|
469
|
+
ip: false,
|
470
|
+
ip4: false,
|
471
|
+
ip6: false,
|
472
|
+
idn: false,
|
473
|
+
punycode: false
|
474
|
+
}
|
475
|
+
}, {
|
476
|
+
name: 'ignoring scheme',
|
477
|
+
url: '://user:pass@example.org:123/some/directory/file.html?query=string#fragment',
|
478
|
+
_url: '//user:pass@example.org:123/some/directory/file.html?query=string#fragment',
|
479
|
+
parts: {
|
480
|
+
protocol: null,
|
481
|
+
username: 'user',
|
482
|
+
password: 'pass',
|
483
|
+
hostname: 'example.org',
|
484
|
+
port: '123',
|
485
|
+
path: '/some/directory/file.html',
|
486
|
+
query: 'query=string',
|
487
|
+
fragment: 'fragment'
|
488
|
+
},
|
489
|
+
accessors: {
|
490
|
+
protocol: '',
|
491
|
+
username: 'user',
|
492
|
+
password: 'pass',
|
493
|
+
port: '123',
|
494
|
+
path: '/some/directory/file.html',
|
495
|
+
query: 'query=string',
|
496
|
+
fragment: 'fragment',
|
497
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
498
|
+
authority: 'user:pass@example.org:123',
|
499
|
+
userinfo: 'user:pass',
|
500
|
+
subdomain: '',
|
501
|
+
domain: 'example.org',
|
502
|
+
tld: 'org',
|
503
|
+
directory: '/some/directory',
|
504
|
+
filename: 'file.html',
|
505
|
+
suffix: 'html',
|
506
|
+
hash: '#fragment',
|
507
|
+
search: '?query=string',
|
508
|
+
host: 'example.org:123',
|
509
|
+
hostname: 'example.org'
|
510
|
+
},
|
511
|
+
is: {
|
512
|
+
urn: false,
|
513
|
+
url: true,
|
514
|
+
relative: false,
|
515
|
+
name: true,
|
516
|
+
sld: false,
|
517
|
+
ip: false,
|
518
|
+
ip4: false,
|
519
|
+
ip6: false,
|
520
|
+
idn: false,
|
521
|
+
punycode: false
|
522
|
+
}
|
523
|
+
}, {
|
524
|
+
name: 'scheme-relative URL',
|
525
|
+
url: '//www.example.org/',
|
526
|
+
parts: {
|
527
|
+
protocol: null,
|
528
|
+
username: null,
|
529
|
+
password: null,
|
530
|
+
hostname: 'www.example.org',
|
531
|
+
port: null,
|
532
|
+
path: '/',
|
533
|
+
query: null,
|
534
|
+
fragment: null
|
535
|
+
},
|
536
|
+
accessors: {
|
537
|
+
protocol: '',
|
538
|
+
username: '',
|
539
|
+
password: '',
|
540
|
+
port: '',
|
541
|
+
path: '/',
|
542
|
+
query: '',
|
543
|
+
fragment: '',
|
544
|
+
resource: '/',
|
545
|
+
authority: 'www.example.org',
|
546
|
+
userinfo: '',
|
547
|
+
subdomain: 'www',
|
548
|
+
domain: 'example.org',
|
549
|
+
tld: 'org',
|
550
|
+
directory: '/',
|
551
|
+
filename: '',
|
552
|
+
suffix: '',
|
553
|
+
hash: '',
|
554
|
+
search: '',
|
555
|
+
host: 'www.example.org',
|
556
|
+
hostname: 'www.example.org'
|
557
|
+
},
|
558
|
+
is: {
|
559
|
+
urn: false,
|
560
|
+
url: true,
|
561
|
+
relative: false,
|
562
|
+
name: true,
|
563
|
+
sld: false,
|
564
|
+
ip: false,
|
565
|
+
ip4: false,
|
566
|
+
ip6: false,
|
567
|
+
idn: false,
|
568
|
+
punycode: false
|
569
|
+
}
|
570
|
+
}, {
|
571
|
+
name: 'IPv4',
|
572
|
+
url: 'http://user:pass@123.123.123.123:123/some/directory/file.html?query=string#fragment',
|
573
|
+
parts: {
|
574
|
+
protocol: 'http',
|
575
|
+
username: 'user',
|
576
|
+
password: 'pass',
|
577
|
+
hostname: '123.123.123.123',
|
578
|
+
port: '123',
|
579
|
+
path: '/some/directory/file.html',
|
580
|
+
query: 'query=string',
|
581
|
+
fragment: 'fragment'
|
582
|
+
},
|
583
|
+
accessors: {
|
584
|
+
protocol: 'http',
|
585
|
+
username: 'user',
|
586
|
+
password: 'pass',
|
587
|
+
port: '123',
|
588
|
+
path: '/some/directory/file.html',
|
589
|
+
query: 'query=string',
|
590
|
+
fragment: 'fragment',
|
591
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
592
|
+
authority: 'user:pass@123.123.123.123:123',
|
593
|
+
userinfo: 'user:pass',
|
594
|
+
subdomain: '',
|
595
|
+
domain: '',
|
596
|
+
tld: '',
|
597
|
+
directory: '/some/directory',
|
598
|
+
filename: 'file.html',
|
599
|
+
suffix: 'html',
|
600
|
+
hash: '#fragment',
|
601
|
+
search: '?query=string',
|
602
|
+
host: '123.123.123.123:123',
|
603
|
+
hostname: '123.123.123.123'
|
604
|
+
},
|
605
|
+
is: {
|
606
|
+
urn: false,
|
607
|
+
url: true,
|
608
|
+
relative: false,
|
609
|
+
name: false,
|
610
|
+
sld: false,
|
611
|
+
ip: true,
|
612
|
+
ip4: true,
|
613
|
+
ip6: false,
|
614
|
+
idn: false,
|
615
|
+
punycode: false
|
616
|
+
}
|
617
|
+
}, {
|
618
|
+
name: 'IPv6',
|
619
|
+
url: 'http://user:pass@fe80:0000:0000:0000:0204:61ff:fe9d:f156/some/directory/file.html?query=string#fragment',
|
620
|
+
parts: {
|
621
|
+
protocol: 'http',
|
622
|
+
username: 'user',
|
623
|
+
password: 'pass',
|
624
|
+
hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156',
|
625
|
+
port: null,
|
626
|
+
path: '/some/directory/file.html',
|
627
|
+
query: 'query=string',
|
628
|
+
fragment: 'fragment'
|
629
|
+
},
|
630
|
+
accessors: {
|
631
|
+
protocol: 'http',
|
632
|
+
username: 'user',
|
633
|
+
password: 'pass',
|
634
|
+
port: '',
|
635
|
+
path: '/some/directory/file.html',
|
636
|
+
query: 'query=string',
|
637
|
+
fragment: 'fragment',
|
638
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
639
|
+
authority: 'user:pass@fe80:0000:0000:0000:0204:61ff:fe9d:f156',
|
640
|
+
userinfo: 'user:pass',
|
641
|
+
subdomain: '',
|
642
|
+
domain: '',
|
643
|
+
tld: '',
|
644
|
+
directory: '/some/directory',
|
645
|
+
filename: 'file.html',
|
646
|
+
suffix: 'html',
|
647
|
+
hash: '#fragment',
|
648
|
+
search: '?query=string',
|
649
|
+
host: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156',
|
650
|
+
hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156'
|
651
|
+
},
|
652
|
+
is: {
|
653
|
+
urn: false,
|
654
|
+
url: true,
|
655
|
+
relative: false,
|
656
|
+
name: false,
|
657
|
+
sld: false,
|
658
|
+
ip: true,
|
659
|
+
ip4: false,
|
660
|
+
ip6: true,
|
661
|
+
idn: false,
|
662
|
+
punycode: false
|
663
|
+
}
|
664
|
+
}, {
|
665
|
+
name: 'IPv6 with port',
|
666
|
+
url: 'http://user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123/some/directory/file.html?query=string#fragment',
|
667
|
+
parts: {
|
668
|
+
protocol: 'http',
|
669
|
+
username: 'user',
|
670
|
+
password: 'pass',
|
671
|
+
hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156',
|
672
|
+
port: '123',
|
673
|
+
path: '/some/directory/file.html',
|
674
|
+
query: 'query=string',
|
675
|
+
fragment: 'fragment'
|
676
|
+
},
|
677
|
+
accessors: {
|
678
|
+
protocol: 'http',
|
679
|
+
username: 'user',
|
680
|
+
password: 'pass',
|
681
|
+
port: '123',
|
682
|
+
path: '/some/directory/file.html',
|
683
|
+
query: 'query=string',
|
684
|
+
fragment: 'fragment',
|
685
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
686
|
+
authority: 'user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123',
|
687
|
+
userinfo: 'user:pass',
|
688
|
+
subdomain: '',
|
689
|
+
domain: '',
|
690
|
+
tld: '',
|
691
|
+
directory: '/some/directory',
|
692
|
+
filename: 'file.html',
|
693
|
+
suffix: 'html',
|
694
|
+
hash: '#fragment',
|
695
|
+
search: '?query=string',
|
696
|
+
host: '[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123',
|
697
|
+
hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156'
|
698
|
+
},
|
699
|
+
is: {
|
700
|
+
urn: false,
|
701
|
+
url: true,
|
702
|
+
relative: false,
|
703
|
+
name: false,
|
704
|
+
sld: false,
|
705
|
+
ip: true,
|
706
|
+
ip4: false,
|
707
|
+
ip6: true,
|
708
|
+
idn: false,
|
709
|
+
punycode: false
|
710
|
+
}
|
711
|
+
}, {
|
712
|
+
name: 'IDN (punycode)',
|
713
|
+
url: 'http://user:pass@xn--exmple-cua.org:123/some/directory/file.html?query=string#fragment',
|
714
|
+
parts: {
|
715
|
+
protocol: 'http',
|
716
|
+
username: 'user',
|
717
|
+
password: 'pass',
|
718
|
+
hostname: 'xn--exmple-cua.org',
|
719
|
+
port: '123',
|
720
|
+
path: '/some/directory/file.html',
|
721
|
+
query: 'query=string',
|
722
|
+
fragment: 'fragment'
|
723
|
+
},
|
724
|
+
accessors: {
|
725
|
+
protocol: 'http',
|
726
|
+
username: 'user',
|
727
|
+
password: 'pass',
|
728
|
+
port: '123',
|
729
|
+
path: '/some/directory/file.html',
|
730
|
+
query: 'query=string',
|
731
|
+
fragment: 'fragment',
|
732
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
733
|
+
authority: 'user:pass@xn--exmple-cua.org:123',
|
734
|
+
userinfo: 'user:pass',
|
735
|
+
subdomain: '',
|
736
|
+
domain: 'xn--exmple-cua.org',
|
737
|
+
tld: 'org',
|
738
|
+
directory: '/some/directory',
|
739
|
+
filename: 'file.html',
|
740
|
+
suffix: 'html',
|
741
|
+
hash: '#fragment',
|
742
|
+
search: '?query=string',
|
743
|
+
host: 'xn--exmple-cua.org:123',
|
744
|
+
hostname: 'xn--exmple-cua.org'
|
745
|
+
},
|
746
|
+
is: {
|
747
|
+
urn: false,
|
748
|
+
url: true,
|
749
|
+
relative: false,
|
750
|
+
name: true,
|
751
|
+
sld: false,
|
752
|
+
ip: false,
|
753
|
+
ip4: false,
|
754
|
+
ip6: false,
|
755
|
+
idn: false,
|
756
|
+
punycode: true
|
757
|
+
}
|
758
|
+
}, {
|
759
|
+
name: 'IDN',
|
760
|
+
url: 'http://user:pass@exämple.org:123/some/directory/file.html?query=string#fragment',
|
761
|
+
parts: {
|
762
|
+
protocol: 'http',
|
763
|
+
username: 'user',
|
764
|
+
password: 'pass',
|
765
|
+
hostname: 'exämple.org',
|
766
|
+
port: '123',
|
767
|
+
path: '/some/directory/file.html',
|
768
|
+
query: 'query=string',
|
769
|
+
fragment: 'fragment'
|
770
|
+
},
|
771
|
+
accessors: {
|
772
|
+
protocol: 'http',
|
773
|
+
username: 'user',
|
774
|
+
password: 'pass',
|
775
|
+
port: '123',
|
776
|
+
path: '/some/directory/file.html',
|
777
|
+
query: 'query=string',
|
778
|
+
fragment: 'fragment',
|
779
|
+
resource: '/some/directory/file.html?query=string#fragment',
|
780
|
+
authority: 'user:pass@exämple.org:123',
|
781
|
+
userinfo: 'user:pass',
|
782
|
+
subdomain: '',
|
783
|
+
domain: 'exämple.org',
|
784
|
+
tld: 'org',
|
785
|
+
directory: '/some/directory',
|
786
|
+
filename: 'file.html',
|
787
|
+
suffix: 'html',
|
788
|
+
hash: '#fragment',
|
789
|
+
search: '?query=string',
|
790
|
+
host: 'exämple.org:123',
|
791
|
+
hostname: 'exämple.org'
|
792
|
+
},
|
793
|
+
is: {
|
794
|
+
urn: false,
|
795
|
+
url: true,
|
796
|
+
relative: false,
|
797
|
+
name: true,
|
798
|
+
sld: false,
|
799
|
+
ip: false,
|
800
|
+
ip4: false,
|
801
|
+
ip6: false,
|
802
|
+
idn: true,
|
803
|
+
punycode: false
|
804
|
+
}
|
805
|
+
}, {
|
806
|
+
name: 'file://',
|
807
|
+
url: 'file:///foo/bar/baz.html',
|
808
|
+
parts: {
|
809
|
+
protocol: 'file',
|
810
|
+
username: null,
|
811
|
+
password: null,
|
812
|
+
hostname: null,
|
813
|
+
port: null,
|
814
|
+
path: '/foo/bar/baz.html',
|
815
|
+
query: null,
|
816
|
+
fragment: null
|
817
|
+
},
|
818
|
+
accessors: {
|
819
|
+
protocol: 'file',
|
820
|
+
username: '',
|
821
|
+
password: '',
|
822
|
+
port: '',
|
823
|
+
path: '/foo/bar/baz.html',
|
824
|
+
query: '',
|
825
|
+
fragment: '',
|
826
|
+
resource: '/foo/bar/baz.html',
|
827
|
+
authority: '',
|
828
|
+
userinfo: '',
|
829
|
+
subdomain: '',
|
830
|
+
domain: '',
|
831
|
+
tld: '',
|
832
|
+
directory: '/foo/bar',
|
833
|
+
filename: 'baz.html',
|
834
|
+
suffix: 'html',
|
835
|
+
hash: '',
|
836
|
+
search: '',
|
837
|
+
host: '',
|
838
|
+
hostname: ''
|
839
|
+
},
|
840
|
+
is: {
|
841
|
+
urn: false,
|
842
|
+
url: true,
|
843
|
+
relative: true,
|
844
|
+
name: false,
|
845
|
+
sld: false,
|
846
|
+
ip: false,
|
847
|
+
ip4: false,
|
848
|
+
ip6: false,
|
849
|
+
idn: false,
|
850
|
+
punycode: false
|
851
|
+
}
|
852
|
+
}, {
|
853
|
+
name: 'file:// Windows-Drive-Letter',
|
854
|
+
url: 'file://C:/WINDOWS/foo.txt',
|
855
|
+
parts: {
|
856
|
+
protocol: 'file',
|
857
|
+
username: null,
|
858
|
+
password: null,
|
859
|
+
hostname: null,
|
860
|
+
port: null,
|
861
|
+
path: 'C:/WINDOWS/foo.txt',
|
862
|
+
query: null,
|
863
|
+
fragment: null
|
864
|
+
},
|
865
|
+
accessors: {
|
866
|
+
protocol: 'file',
|
867
|
+
username: '',
|
868
|
+
password: '',
|
869
|
+
port: '',
|
870
|
+
path: 'C:/WINDOWS/foo.txt',
|
871
|
+
query: '',
|
872
|
+
fragment: '',
|
873
|
+
resource: 'C:/WINDOWS/foo.txt',
|
874
|
+
authority: '',
|
875
|
+
userinfo: '',
|
876
|
+
subdomain: '',
|
877
|
+
domain: '',
|
878
|
+
tld: '',
|
879
|
+
directory: 'C:/WINDOWS',
|
880
|
+
filename: 'foo.txt',
|
881
|
+
suffix: 'txt',
|
882
|
+
hash: '',
|
883
|
+
search: '',
|
884
|
+
host: '',
|
885
|
+
hostname: ''
|
886
|
+
},
|
887
|
+
is: {
|
888
|
+
urn: false,
|
889
|
+
url: true,
|
890
|
+
relative: true,
|
891
|
+
name: false,
|
892
|
+
sld: false,
|
893
|
+
ip: false,
|
894
|
+
ip4: false,
|
895
|
+
ip6: false,
|
896
|
+
idn: false,
|
897
|
+
punycode: false
|
898
|
+
}
|
899
|
+
}, {
|
900
|
+
name: 'Path containing @',
|
901
|
+
url: 'http://www.example.org/@foobar',
|
902
|
+
parts: {
|
903
|
+
protocol: 'http',
|
904
|
+
username: null,
|
905
|
+
password: null,
|
906
|
+
hostname: 'www.example.org',
|
907
|
+
port: null,
|
908
|
+
path: '/@foobar',
|
909
|
+
query: null,
|
910
|
+
fragment: null
|
911
|
+
},
|
912
|
+
accessors: {
|
913
|
+
protocol: 'http',
|
914
|
+
username: '',
|
915
|
+
password: '',
|
916
|
+
port: '',
|
917
|
+
path: '/@foobar',
|
918
|
+
query: '',
|
919
|
+
fragment: '',
|
920
|
+
resource: '/@foobar',
|
921
|
+
authority: 'www.example.org',
|
922
|
+
userinfo: '',
|
923
|
+
subdomain: 'www',
|
924
|
+
domain: 'example.org',
|
925
|
+
tld: 'org',
|
926
|
+
directory: '/',
|
927
|
+
filename: '@foobar',
|
928
|
+
suffix: '',
|
929
|
+
hash: '', // location.hash style
|
930
|
+
search: '', // location.search style
|
931
|
+
host: 'www.example.org',
|
932
|
+
hostname: 'www.example.org'
|
933
|
+
},
|
934
|
+
is: {
|
935
|
+
urn: false,
|
936
|
+
url: true,
|
937
|
+
relative: false,
|
938
|
+
name: true,
|
939
|
+
sld: false,
|
940
|
+
ip: false,
|
941
|
+
ip4: false,
|
942
|
+
ip6: false,
|
943
|
+
idn: false,
|
944
|
+
punycode: false
|
945
|
+
}
|
946
|
+
}, {
|
947
|
+
name: 'mailto:',
|
948
|
+
url: 'mailto:hello@example.org?subject=hello',
|
949
|
+
_url: 'mailto:hello@example.org?subject=hello',
|
950
|
+
parts: {
|
951
|
+
protocol: 'mailto',
|
952
|
+
username: null,
|
953
|
+
password: null,
|
954
|
+
hostname: null,
|
955
|
+
port: null,
|
956
|
+
path: 'hello@example.org',
|
957
|
+
query: 'subject=hello',
|
958
|
+
fragment: null
|
959
|
+
},
|
960
|
+
accessors: {
|
961
|
+
protocol: 'mailto',
|
962
|
+
username: '',
|
963
|
+
password: '',
|
964
|
+
port: '',
|
965
|
+
path: 'hello@example.org',
|
966
|
+
query: 'subject=hello',
|
967
|
+
fragment: '',
|
968
|
+
resource: 'hello@example.org?subject=hello',
|
969
|
+
authority: '',
|
970
|
+
userinfo: '',
|
971
|
+
subdomain: '',
|
972
|
+
domain: '',
|
973
|
+
tld: '',
|
974
|
+
directory: '',
|
975
|
+
filename: '',
|
976
|
+
suffix: '',
|
977
|
+
hash: '',
|
978
|
+
search: '?subject=hello',
|
979
|
+
host: '',
|
980
|
+
hostname: ''
|
981
|
+
},
|
982
|
+
is: {
|
983
|
+
urn: true,
|
984
|
+
url: false,
|
985
|
+
relative: false,
|
986
|
+
name: false,
|
987
|
+
sld: false,
|
988
|
+
ip: false,
|
989
|
+
ip4: false,
|
990
|
+
ip6: false,
|
991
|
+
idn: false,
|
992
|
+
punycode: false
|
993
|
+
}
|
994
|
+
}, {
|
995
|
+
name: 'magnet:',
|
996
|
+
url: 'magnet:?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
|
997
|
+
_url: 'magnet:?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
|
998
|
+
parts: {
|
999
|
+
protocol: 'magnet',
|
1000
|
+
username: null,
|
1001
|
+
password: null,
|
1002
|
+
hostname: null,
|
1003
|
+
port: null,
|
1004
|
+
path: '',
|
1005
|
+
query: 'xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
|
1006
|
+
fragment: null
|
1007
|
+
},
|
1008
|
+
accessors: {
|
1009
|
+
protocol: 'magnet',
|
1010
|
+
username: '',
|
1011
|
+
password: '',
|
1012
|
+
port: '',
|
1013
|
+
path: '',
|
1014
|
+
query: 'xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
|
1015
|
+
fragment: '',
|
1016
|
+
resource: '?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
|
1017
|
+
authority: '',
|
1018
|
+
userinfo: '',
|
1019
|
+
subdomain: '',
|
1020
|
+
domain: '',
|
1021
|
+
tld: '',
|
1022
|
+
directory: '',
|
1023
|
+
filename: '',
|
1024
|
+
suffix: '',
|
1025
|
+
hash: '',
|
1026
|
+
search: '?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
|
1027
|
+
host: '',
|
1028
|
+
hostname: ''
|
1029
|
+
},
|
1030
|
+
is: {
|
1031
|
+
urn: true,
|
1032
|
+
url: false,
|
1033
|
+
relative: false,
|
1034
|
+
name: false,
|
1035
|
+
sld: false,
|
1036
|
+
ip: false,
|
1037
|
+
ip4: false,
|
1038
|
+
ip6: false,
|
1039
|
+
idn: false,
|
1040
|
+
punycode: false
|
1041
|
+
}
|
1042
|
+
}, {
|
1043
|
+
name: 'javascript:',
|
1044
|
+
url: 'javascript:alert("hello world");',
|
1045
|
+
_url: 'javascript:alert("hello world");',
|
1046
|
+
parts: {
|
1047
|
+
protocol: 'javascript',
|
1048
|
+
username: null,
|
1049
|
+
password: null,
|
1050
|
+
hostname: null,
|
1051
|
+
port: null,
|
1052
|
+
path: 'alert("hello world");',
|
1053
|
+
query: null,
|
1054
|
+
fragment: null
|
1055
|
+
},
|
1056
|
+
accessors: {
|
1057
|
+
protocol: 'javascript',
|
1058
|
+
username: '',
|
1059
|
+
password: '',
|
1060
|
+
port: '',
|
1061
|
+
path: 'alert("hello world");',
|
1062
|
+
query: '',
|
1063
|
+
fragment: '',
|
1064
|
+
resource: 'alert("hello world");',
|
1065
|
+
authority: '',
|
1066
|
+
userinfo: '',
|
1067
|
+
subdomain: '',
|
1068
|
+
domain: '',
|
1069
|
+
tld: '',
|
1070
|
+
directory: '',
|
1071
|
+
filename: '',
|
1072
|
+
suffix: '',
|
1073
|
+
hash: '',
|
1074
|
+
search: '',
|
1075
|
+
host: '',
|
1076
|
+
hostname: ''
|
1077
|
+
},
|
1078
|
+
is: {
|
1079
|
+
urn: true,
|
1080
|
+
url: false,
|
1081
|
+
relative: false,
|
1082
|
+
name: false,
|
1083
|
+
sld: false,
|
1084
|
+
ip: false,
|
1085
|
+
ip4: false,
|
1086
|
+
ip6: false,
|
1087
|
+
idn: false,
|
1088
|
+
punycode: false
|
1089
|
+
}
|
1090
|
+
}, {
|
1091
|
+
name: 'colon in path',
|
1092
|
+
url: 'http://en.wikipedia.org/wiki/Help:IPA',
|
1093
|
+
_url: 'http://en.wikipedia.org/wiki/Help:IPA',
|
1094
|
+
parts: {
|
1095
|
+
protocol: 'http',
|
1096
|
+
username: null,
|
1097
|
+
password: null,
|
1098
|
+
hostname: 'en.wikipedia.org',
|
1099
|
+
port: null,
|
1100
|
+
path: '/wiki/Help:IPA',
|
1101
|
+
query: null,
|
1102
|
+
fragment: null
|
1103
|
+
},
|
1104
|
+
accessors: {
|
1105
|
+
protocol: 'http',
|
1106
|
+
username: '',
|
1107
|
+
password: '',
|
1108
|
+
port: '',
|
1109
|
+
path: '/wiki/Help:IPA',
|
1110
|
+
query: '',
|
1111
|
+
fragment: '',
|
1112
|
+
resource: '/wiki/Help:IPA',
|
1113
|
+
authority: 'en.wikipedia.org',
|
1114
|
+
userinfo: '',
|
1115
|
+
subdomain: 'en',
|
1116
|
+
domain: 'wikipedia.org',
|
1117
|
+
tld: 'org',
|
1118
|
+
directory: '/wiki',
|
1119
|
+
filename: 'Help:IPA',
|
1120
|
+
suffix: '',
|
1121
|
+
hash: '',
|
1122
|
+
search: '',
|
1123
|
+
host: 'en.wikipedia.org',
|
1124
|
+
hostname: 'en.wikipedia.org'
|
1125
|
+
},
|
1126
|
+
is: {
|
1127
|
+
urn: false,
|
1128
|
+
url: true,
|
1129
|
+
relative: false,
|
1130
|
+
name: true,
|
1131
|
+
sld: false,
|
1132
|
+
ip: false,
|
1133
|
+
ip4: false,
|
1134
|
+
ip6: false,
|
1135
|
+
idn: false,
|
1136
|
+
punycode: false
|
1137
|
+
}
|
1138
|
+
}, {
|
1139
|
+
name: 'colon in path without protocol',
|
1140
|
+
url: '/wiki/Help:IPA',
|
1141
|
+
_url: '/wiki/Help:IPA',
|
1142
|
+
parts: {
|
1143
|
+
protocol: null,
|
1144
|
+
username: null,
|
1145
|
+
password: null,
|
1146
|
+
hostname: null,
|
1147
|
+
port: null,
|
1148
|
+
path: '/wiki/Help:IPA',
|
1149
|
+
query: null,
|
1150
|
+
fragment: null
|
1151
|
+
},
|
1152
|
+
accessors: {
|
1153
|
+
protocol: '',
|
1154
|
+
username: '',
|
1155
|
+
password: '',
|
1156
|
+
port: '',
|
1157
|
+
path: '/wiki/Help:IPA',
|
1158
|
+
query: '',
|
1159
|
+
fragment: '',
|
1160
|
+
resource: '/wiki/Help:IPA',
|
1161
|
+
authority: '',
|
1162
|
+
userinfo: '',
|
1163
|
+
subdomain: '',
|
1164
|
+
domain: '',
|
1165
|
+
tld: '',
|
1166
|
+
directory: '/wiki',
|
1167
|
+
filename: 'Help:IPA',
|
1168
|
+
suffix: '',
|
1169
|
+
hash: '',
|
1170
|
+
search: '',
|
1171
|
+
host: '',
|
1172
|
+
hostname: ''
|
1173
|
+
},
|
1174
|
+
is: {
|
1175
|
+
urn: false,
|
1176
|
+
url: true,
|
1177
|
+
relative: true,
|
1178
|
+
name: false,
|
1179
|
+
sld: false,
|
1180
|
+
ip: false,
|
1181
|
+
ip4: false,
|
1182
|
+
ip6: false,
|
1183
|
+
idn: false,
|
1184
|
+
punycode: false
|
1185
|
+
}
|
1186
|
+
}, {
|
1187
|
+
name: 'colon dash dash in path without protocol',
|
1188
|
+
url: '/foo/xy://bar',
|
1189
|
+
_url: '/foo/xy://bar',
|
1190
|
+
parts: {
|
1191
|
+
protocol: null,
|
1192
|
+
username: null,
|
1193
|
+
password: null,
|
1194
|
+
hostname: null,
|
1195
|
+
port: null,
|
1196
|
+
path: '/foo/xy://bar',
|
1197
|
+
query: null,
|
1198
|
+
fragment: null
|
1199
|
+
},
|
1200
|
+
accessors: {
|
1201
|
+
protocol: '',
|
1202
|
+
username: '',
|
1203
|
+
password: '',
|
1204
|
+
port: '',
|
1205
|
+
path: '/foo/xy://bar',
|
1206
|
+
query: '',
|
1207
|
+
fragment: '',
|
1208
|
+
resource: '/foo/xy://bar',
|
1209
|
+
authority: '',
|
1210
|
+
userinfo: '',
|
1211
|
+
subdomain: '',
|
1212
|
+
domain: '',
|
1213
|
+
tld: '',
|
1214
|
+
directory: '/foo/xy:/', // sanitized empty directory!
|
1215
|
+
filename: 'bar',
|
1216
|
+
suffix: '',
|
1217
|
+
hash: '',
|
1218
|
+
search: '',
|
1219
|
+
host: '',
|
1220
|
+
hostname: ''
|
1221
|
+
},
|
1222
|
+
is: {
|
1223
|
+
urn: false,
|
1224
|
+
url: true,
|
1225
|
+
relative: true,
|
1226
|
+
name: false,
|
1227
|
+
sld: false,
|
1228
|
+
ip: false,
|
1229
|
+
ip4: false,
|
1230
|
+
ip6: false,
|
1231
|
+
idn: false,
|
1232
|
+
punycode: false
|
1233
|
+
}
|
1234
|
+
}
|
1235
|
+
];
|
1236
|
+
|