Skip to content

Commit

Permalink
Used encodeURI instead of replacing strings to catch other unwanted c…
Browse files Browse the repository at this point in the history
…haracters
  • Loading branch information
dzhu committed Mar 29, 2016
1 parent 45103b7 commit 5a9f383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/extensions/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
return 'tel:' + value;
} else {
// Check for URL scheme and default to http:// if none found
return (urlSchemeRegex.test(value) ? '' : 'http://') + value.replace(/\s/g, '%20');
return (urlSchemeRegex.test(value) ? '' : 'http://') + encodeURI(value);
}
},

Expand Down

0 comments on commit 5a9f383

Please sign in to comment.