mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-05 19:01:30 +00:00
Only urlencode tag values that start with http (closes #2657)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user