diff --git a/lib/sanitize.js b/lib/sanitize.js index 7e517bc..d280c8e 100644 --- a/lib/sanitize.js +++ b/lib/sanitize.js @@ -30,6 +30,15 @@ function Sanitize(){ this.config.allow_comments = options.allow_comments ? options.allow_comments : false; this.allowed_elements = {}; this.config.protocols = options.protocols ? options.protocols : {}; + //allowed styles + this.config.styles = options.styles ? options.styles : []; + this.config.cssValues = options.cssValues ? options.cssValues : {}; + + //add the rgb counterparts to colors + this.hexToRgb(this.config.cssValues.color); + //add the rgb counterparts to background colors + this.hexToRgb(this.config.cssValues.backgroundColor); + this.config.add_attributes = options.add_attributes ? options.add_attributes : {}; this.dom = options.dom ? options.dom : document; for(i=0;i