allow images in body and comments

This commit is contained in:
Arunoda Susiripala 2014-09-13 04:47:02 +05:30
parent 4f6ab74e61
commit e820328bbb

View file

@ -99,7 +99,14 @@ sanitize = function (s) {
// console.log('// before sanitization:')
// console.log(s)
if(Meteor.isServer){
var s = sanitizeHtml(s)
var s = sanitizeHtml(s, {
allowedTags: [
'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul',
'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike',
'code', 'hr', 'br', 'div', 'table', 'thead', 'caption',
'tbody', 'tr', 'th', 'td', 'pre', 'img'
]
});
// console.log('// after sanitization:')
// console.log(s)
}