From 922378a248e2c9d5edcf9bc6285807b64a80efc5 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 5 Jul 2017 09:55:12 +0700 Subject: [PATCH] Support double quote in name of tag. I updated createTag function to make this function to support double quote ("") in the name of tag. --- js/tag-it.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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, {