remove sanitizeHtml import from modules/utils

This commit is contained in:
ochicf 2018-03-10 11:08:57 +01:00
parent 593330370c
commit d16e865f0d

View file

@ -7,7 +7,6 @@ Utilities
import marked from 'marked'; import marked from 'marked';
import urlObject from 'url'; import urlObject from 'url';
import moment from 'moment'; import moment from 'moment';
import sanitizeHtml from 'sanitize-html';
import getSlug from 'speakingurl'; import getSlug from 'speakingurl';
import { getSetting, registerSetting } from './settings.js'; import { getSetting, registerSetting } from './settings.js';
import { Routes } from './routes.js'; import { Routes } from './routes.js';
@ -208,20 +207,6 @@ Utils.cleanUp = function(s) {
}; };
Utils.sanitize = function(s) { Utils.sanitize = function(s) {
// console.log('// before sanitization:')
// console.log(s)
if(Meteor.isServer){
s = sanitizeHtml(s, {
allowedTags: [
'h1', 'h2', '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)
}
return s; return s;
}; };