Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let fullUrl = 'stalror.operations.dynamics.com/?t=2020-02-17T06%3A45%3A18.9640042Z&cmp=STSE&mi=UserWorkspace&q=MyWorkspace1';
- let safeUrl = fullUrl.toLowerCase();
- if (!/^([a-z0-9\-\_\.]+)*:\/\//.test(safeUrl)) {
- safeUrl = 'https://' + safeUrl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement