diff --git a/notebook/static/base/js/namespace.js b/notebook/static/base/js/namespace.js index 342111fb9..f3e72692e 100644 --- a/notebook/static/base/js/namespace.js +++ b/notebook/static/base/js/namespace.js @@ -4,6 +4,7 @@ var IPython = IPython || {}; define(function(){ var utils = require('base/js/utils'); + IPython.security = require('base/js/security'); IPython.utils = utils; IPython.load_extensions = utils.load_extensions; diff --git a/notebook/static/base/js/security.js b/notebook/static/base/js/security.js index 872d50573..f2bd20317 100644 --- a/notebook/static/base/js/security.js +++ b/notebook/static/base/js/security.js @@ -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 = $("
").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; });