Node.js based forum software built for the modern web
parse category description closes #3209
barisusakli5d94b00883c3
diff --git a/src/categories.js b/src/categories.jsindex 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.tplindex 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 @@</div><div class="information"><h5 class="header">{categories.name}</h5>- <p class="description">{categories.description}</p>+ <p class="description">{categories.descriptionParsed}</p></div></div></div>