From feea5065e22a924e7f64fc33611d167c05ec0fc8 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 17 Jan 2013 14:18:49 -0500 Subject: [PATCH] Do not permit values longer than 255 chars in the inspector --- js/id/ui/inspector.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 3af39c1b7..600538e4c 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -114,12 +114,14 @@ iD.ui.inspector = function() { inputs.append('input') .property('type', 'text') .attr('class', 'key') + .attr('maxlength', 255) .property('value', function(d) { return d.key; }) .on('change', function(d) { d.key = this.value; }); inputs.append('input') .property('type', 'text') .attr('class', 'value') + .attr('maxlength', 255) .property('value', function(d) { return d.value; }) .on('change', function(d) { d.value = this.value; }) .on('keydown.push-more', pushMore); @@ -271,7 +273,7 @@ iD.ui.inspector = function() { inspector.tags = function (tags) { if (!arguments.length) { - var tags = {}; + tags = {}; tagList.selectAll('li').each(function() { var row = d3.select(this), key = row.selectAll('.key').property('value'),