From 90957dec7f17b33aaaaf6b2000540f72a1844982 Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Jul 11 2019 12:44:46 +0000 Subject: issue_ev.js: fix csp errors on new tag event --- diff --git a/pagure/static/issue_ev.js b/pagure/static/issue_ev.js index ff0c32e..91f7268 100644 --- a/pagure/static/issue_ev.js +++ b/pagure/static/issue_ev.js @@ -22,10 +22,17 @@ add_tags = function(data, _issues_url) { var field = $('#taglist'); for (i=0; i'+tag+''; - field.append(html); + tag = data.added_tags[i]; + var obj = document.createElement('a'); + $(obj).attr('id', 'tag-' + tag); + $(obj).attr('title', ''); + $(obj).addClass('badge badge-secondary badge-tag text-left my-1 p-2 '); + $(obj).attr('href', _issues_url + '?tags=' + tag); + $(obj).attr('data-bg-color', data.added_tags_color[i]); + $(obj).text(tag); + + field.append(obj); + $(obj).css('background-color', $(obj).attr('data-bg-color')); if ($select.length) { selectize.createItem(tag); }