aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 922e7db3..e23799d8 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -114,6 +114,8 @@ var utils = {
* We don't bother with escaping characters, however, as Chrome will do that for us.
*/
ensureUrl: function(str) {
+ // trim str
+ str = str.replace(/^\s+|\s+$/g, '');
if (utils.isUrl(str))
return utils.createFullUrl(str);
else