diff --git a/js/tag-it.js b/js/tag-it.js index 078c264f..a1773174 100644 --- a/js/tag-it.js +++ b/js/tag-it.js @@ -494,8 +494,11 @@ // Unless options.singleField is set, each tag has a hidden input field inline. if (!this.options.singleField) { - var escapedValue = label.html(); - tag.append(''); + var escapedValue = label.text(); + var hiddenField = $(''); + hiddenField.val(escapedValue); + hiddenField.attr('name', this.options.fieldName); + tag.append(hiddenField); } if (this._trigger('beforeTagAdded', null, {