v1.18.x
barisusakli 9 years ago
parent 7d96a1c130
commit 7e6e3b3a40

@ -155,12 +155,6 @@ define('admin/manage/category', [
} else { } else {
$('a[href="#analytics"]').on('shown.bs.tab', Category.setupGraphs); $('a[href="#analytics"]').on('shown.bs.tab', Category.setupGraphs);
} }
// Fix the input field for the category name, as it can contain a translation key
var nameInput = $('#cid-' + ajaxify.data.cid + '-name');
if (ajaxify.data.category.name !== nameInput.val()) {
$('#cid-' + ajaxify.data.category.cid + '-name').val(ajaxify.data.category.name);
}
}; };
Category.setupPrivilegeTable = function() { Category.setupPrivilegeTable = function() {

@ -1,11 +1,12 @@
"use strict"; "use strict";
var async = require('async'), var async = require('async');
categories = require('../../categories'), var categories = require('../../categories');
privileges = require('../../privileges'), var privileges = require('../../privileges');
analytics = require('../../analytics'), var analytics = require('../../analytics');
plugins = require('../../plugins'); var plugins = require('../../plugins');
var translator = require('../../../public/src/modules/translator')
var categoriesController = {}; var categoriesController = {};
@ -24,7 +25,7 @@ categoriesController.get = function(req, res, next) {
if (err) { if (err) {
return next(err); return next(err);
} }
data.category.name = translator.escape(data.category.name);
res.render('admin/manage/category', { res.render('admin/manage/category', {
category: data.category, category: data.category,
privileges: data.privileges, privileges: data.privileges,

Loading…
Cancel
Save