remove spaces from strings which look like urls

This commit is contained in:
Martin Stubenschrott committed 2008-11-29 15:29:32 +00:00
1 parent 36b676d508
commit 3f6f53580f
2 files changed
+7

No files matched your search

+4
View File
@@ -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+$/, "");