We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94f4662 commit 9ff839aCopy full SHA for 9ff839a
3 files changed
api/models/Topic.js
@@ -7,6 +7,7 @@
7
8
var _ = require('lodash');
9
var Promise = require('bluebird');
10
+var sanitizeHtml = require('sanitize-html');
11
12
module.exports = {
13
@@ -232,6 +233,11 @@ module.exports = {
232
233
topic.usage = topic.usage.contents;
234
}
235
236
+ topic.examples = sanitizeHtml(topic.examples, {
237
+ allowedTags: ['a' ],
238
+ allowedAttributes: {}
239
+ });
240
+
241
var arrayToString = function(val) {
242
if (val instanceof Array) {
243
if (_.isEmpty(val)) return '';
0 commit comments