mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 13:32:27 +01:00
remove spaces from strings which look like urls
This commit is contained in:
@@ -470,6 +470,10 @@ const util = { //{{{
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
// removes spaces from the string if it starts with http:// or something like that
|
||||
if (/^\w+:\/\//.test(urls[url]))
|
||||
urls[url] = urls[url].replace(/\s+/g, "");
|
||||
|
||||
// strip each 'URL' - makes things simpler later on
|
||||
urls[url] = urls[url].replace(/^\s+/, "").replace(/\s+$/, "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user