Make sure & doesn't become & when editing a category

This commit is contained in:
Mike Koch 2016-05-10 13:02:43 -04:00
parent 441a8e537e
commit d4cad22526

View File

@ -467,7 +467,12 @@ while ($mycat = hesk_dbFetchAssoc($res)) {
$(document).ready(function() {
$('.category-modal-trigger').click(function() {
var $row = $('tr[data-category-id="' + $(this).attr('data-category-id') + '"]');
var name = $row.attr('data-name');
// Since the data-name attribute is escaped, this needs to be converted back via this fancy method.
var tempNameElement = document.createElement('textarea');
tempNameElement.innerHTML = $row.attr('data-name');
var name = tempNameElement.value;
var id = $row.attr('data-category-id');
var color = $row.attr('data-color');
var priority = $row.attr('data-priority');