Only urlencode tag values that start with http (closes #2657)

This commit is contained in:
Bryan Housel
2015-05-26 09:57:46 -04:00
parent f8d62e6394
commit 51dfbb18cf

View File

@@ -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);