From 51dfbb18cf24fb4c37474b635c2b1919db7b3fec Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 26 May 2015 09:57:46 -0400 Subject: [PATCH] Only urlencode tag values that start with http (closes #2657) --- js/id/ui/entity_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/ui/entity_editor.js b/js/id/ui/entity_editor.js index 045d04fc8..381a205d4 100644 --- a/js/id/ui/entity_editor.js +++ b/js/id/ui/entity_editor.js @@ -148,7 +148,7 @@ iD.ui.EntityEditor = function(context) { // It is only intended to prevent obvious copy-paste errors. (#2323) // clean website-like tags - if (k.indexOf('website') !== -1 || cleaned.indexOf('http') !== -1) { + if (k.indexOf('website') !== -1 || cleaned.indexOf('http') === 0) { cleaned = cleaned .replace(/[\u200B-\u200F\uFEFF]/g, '') // strip LRM and other zero width chars .replace(/[^\w\+\-\.\/\?\[\]\(\)~!@#$%&*',:;=]/g, encodeURIComponent);