File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,11 @@ const slashedProtocol = new SafeSet([
95
95
'gopher' ,
96
96
'gopher:' ,
97
97
'file' ,
98
- 'file:'
98
+ 'file:' ,
99
+ 'ws' ,
100
+ 'ws:' ,
101
+ 'wss' ,
102
+ 'wss:'
99
103
] ) ;
100
104
const {
101
105
CHAR_SPACE ,
Original file line number Diff line number Diff line change @@ -923,6 +923,26 @@ const parseTests = {
923
923
pathname : "alert(1);a='@white-listed.com'" ,
924
924
path : "alert(1);a='@white-listed.com'" ,
925
925
href : "javascript:alert(1);a='@white-listed.com'"
926
+ } ,
927
+
928
+ 'ws://www.example.com' : {
929
+ protocol : 'ws:' ,
930
+ slashes : true ,
931
+ hostname : 'www.example.com' ,
932
+ host : 'www.example.com' ,
933
+ pathname : '/' ,
934
+ path : '/' ,
935
+ href : 'ws://www.example.com/'
936
+ } ,
937
+
938
+ 'wss://www.example.com' : {
939
+ protocol : 'wss:' ,
940
+ slashes : true ,
941
+ hostname : 'www.example.com' ,
942
+ host : 'www.example.com' ,
943
+ pathname : '/' ,
944
+ path : '/' ,
945
+ href : 'wss://www.example.com/'
926
946
}
927
947
} ;
928
948
You can’t perform that action at this time.
0 commit comments