From 560987affcd6ab78121c4015fec91bbf1a284f14 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 7 Nov 2016 10:29:34 -0800 Subject: adding test fix for tags/chips in new post UI --- management/editor/elements.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'management/editor') diff --git a/management/editor/elements.go b/management/editor/elements.go index 742c5a5..68b2b54 100644 --- a/management/editor/elements.go +++ b/management/editor/elements.go @@ -353,7 +353,7 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte { i := 0 for _, tag := range tags { tagName := tagNameFromStructFieldMulti(fieldName, i, p) - html += `` + html += `` initial = append(initial, `{tag: '`+tag+`'}`) i++ } @@ -372,6 +372,9 @@ func Tags(fieldName string, p interface{}, attrs map[string]string) []byte { chips.on('chip.add', function(e, chip) { chips.parent().find('.empty-tag').remove(); + + // escape content of chip tag + chip.tag = URIEscapeComponent(chip.tag); var input = $(''); input.attr({ -- cgit v1.2.3