|
|
|
|
@ -2,10 +2,8 @@
|
|
|
|
|
// Distributed under the terms of the Modified BSD License.
|
|
|
|
|
|
|
|
|
|
define([
|
|
|
|
|
'base/js/namespace',
|
|
|
|
|
'jquery',
|
|
|
|
|
'components/google-caja/html-css-sanitizer-minified',
|
|
|
|
|
], function(IPython, $) {
|
|
|
|
|
], function(sanitize) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
var noop = function (x) { return x; };
|
|
|
|
|
@ -59,7 +57,7 @@ define([
|
|
|
|
|
* sanitize just the css in style tags in a block of html
|
|
|
|
|
* called by sanitize_html, if allow_css is true
|
|
|
|
|
*/
|
|
|
|
|
var h = $("<div/>").append(html);
|
|
|
|
|
var h = document.createElement('div').append(html);
|
|
|
|
|
var style_tags = h.find("style");
|
|
|
|
|
if (!style_tags.length) {
|
|
|
|
|
// no style tags to sanitize
|
|
|
|
|
@ -123,7 +121,5 @@ define([
|
|
|
|
|
sanitize_html: sanitize_html
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IPython.security = security;
|
|
|
|
|
|
|
|
|
|
return security;
|
|
|
|
|
});
|
|
|
|
|
|