Get rid of reverse dependency for security,

remove single jquery usage in security in favor of native dom element
creation
pull/102/head
Matthias Bussonnier 11 years ago
parent 36bb3fef27
commit 7cffe80461

@ -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;

@ -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;
});

Loading…
Cancel
Save