diff --git a/lib/url.js b/lib/url.js index 4b142542..34feba5a 100644 --- a/lib/url.js +++ b/lib/url.js @@ -1,4 +1,5 @@ export function ensureProtocol (value) { + value = value.trim() if (!/^([a-z0-9]+:\/\/|mailto:)/.test(value)) { value = 'http://' + value }