diff --git a/src/categories.js b/src/categories.js index e033102264..d30cd0c47a 100644 --- a/src/categories.js +++ b/src/categories.js @@ -166,15 +166,22 @@ var async = require('async'), category.topic_count = category.totalTopicCount = category.topic_count || 0; } - if (category.description) { - category.description = validator.escape(category.description); - } - if (category.image) { category.backgroundImage = category.image; } - callback(null, category); + if (category.description) { + plugins.fireHook('filter:parse.raw', category.description, function(err, parsedDescription) { + if (err) { + return callback(err); + } + category.descriptionParsed = parsedDescription; + category.description = validator.escape(category.description); + callback(null, category); + }); + } else { + callback(null, category); + } } Categories.getCategoryField = function(cid, field, callback) { diff --git a/src/views/admin/partials/categories/category-rows.tpl b/src/views/admin/partials/categories/category-rows.tpl index 2124797cb1..bdce593887 100644 --- a/src/views/admin/partials/categories/category-rows.tpl +++ b/src/views/admin/partials/categories/category-rows.tpl @@ -9,7 +9,7 @@
{categories.description}
+{categories.descriptionParsed}