File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 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([
9595 'gopher' ,
9696 'gopher:' ,
9797 'file' ,
98- 'file:'
98+ 'file:' ,
99+ 'ws' ,
100+ 'ws:' ,
101+ 'wss' ,
102+ 'wss:'
99103] ) ;
100104const {
101105 CHAR_SPACE ,
Original file line number Diff line number Diff line change @@ -923,6 +923,26 @@ const parseTests = {
923923 pathname : "alert(1);a='@white-listed.com'" ,
924924 path : "alert(1);a='@white-listed.com'" ,
925925 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/'
926946 }
927947} ;
928948
You can’t perform that action at this time.
0 commit comments