Skip to content

Commit

Permalink
Add mailto: and steam: to known protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jun 4, 2024
1 parent a2a2c9f commit d51150b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/containers/tw-security-manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,17 @@ const parseURL = url => {
} catch (e) {
return null;
}
const protocols = ['http:', 'https:', 'ws:', 'wss:', 'data:', 'blob:'];
const protocols = [
// The important one we want to exclude is javascript:
'http:',
'https:',
'ws:',
'wss:',
'data:',
'blob:',
'mailto:',
'steam:'
];
if (!protocols.includes(parsed.protocol)) {
return null;
}
Expand Down

0 comments on commit d51150b

Please sign in to comment.