From 8f56018140c860b5b196588b6a4fdfea10617938 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 3 Nov 2014 20:48:23 +0100 Subject: [PATCH] Added banned tag input prevention --- public_html/js/Controls/TagInput.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public_html/js/Controls/TagInput.js b/public_html/js/Controls/TagInput.js index 4e939bbd..4a058022 100644 --- a/public_html/js/Controls/TagInput.js +++ b/public_html/js/Controls/TagInput.js @@ -155,9 +155,14 @@ App.Controls.TagInput = function($underlyingInput) { flashTagRed(tagName); } else { beforeTagAdded(tagName, options); - tags.push(tagName); - var $elem = createListElement(tagName); - $tagList.append($elem); + + var exportedTag = getExportedTag(tagName); + if (!exportedTag || !exportedTag.banned) { + tags.push(tagName); + var $elem = createListElement(tagName); + $tagList.append($elem); + } + afterTagAdded(tagName, options); } }