diff --git a/js/id/ui/preset/combo.js b/js/id/ui/preset/combo.js index c6f1e4e63..18f4a38af 100644 --- a/js/id/ui/preset/combo.js +++ b/js/id/ui/preset/combo.js @@ -32,7 +32,7 @@ iD.ui.preset.typeCombo = function(field) { function options(opts) { combobox.data(opts.map(function(d) { var o = {}; - o.title = o.value = d.replace('_', ' '); + o.title = o.value = d.replace(/_+/g, ' '); return o; })); @@ -44,7 +44,7 @@ iD.ui.preset.typeCombo = function(field) { } function change() { - var value = input.value().replace(' ', '_'); + var value = input.value().replace(/\s+/g, '_'); if (field.type === 'typeCombo' && !value) value = 'yes'; var t = {};