|
@ -44,8 +44,8 @@ var protocolPattern = /^([a-z0-9]+:)/i, |
|
|
.concat(unwise).concat(autoEscape), |
|
|
.concat(unwise).concat(autoEscape), |
|
|
nonAuthChars = ['/', '@', '?', '#'].concat(delims), |
|
|
nonAuthChars = ['/', '@', '?', '#'].concat(delims), |
|
|
hostnameMaxLen = 255, |
|
|
hostnameMaxLen = 255, |
|
|
hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z-]{0,62}$/, |
|
|
hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/, |
|
|
hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z-]{0,62})(.*)$/, |
|
|
hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/, |
|
|
// protocols that can allow "unsafe" and "unwise" chars.
|
|
|
// protocols that can allow "unsafe" and "unwise" chars.
|
|
|
unsafeProtocol = { |
|
|
unsafeProtocol = { |
|
|
'javascript': true, |
|
|
'javascript': true, |
|
|