From 025c76f2d3f8c936ef59f6c9a58ba42589b8c31c Mon Sep 17 00:00:00 2001 From: adon Date: Wed, 12 Aug 2015 18:55:35 +0800 Subject: [PATCH] fix independent use of yubl --- src/html-purify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/html-purify.js b/src/html-purify.js index 9a79156..c6d23a1 100755 --- a/src/html-purify.js +++ b/src/html-purify.js @@ -9,7 +9,8 @@ See the accompanying LICENSE file for terms. var Parser = require('context-parser').Parser, tagAttList = require("./tag-attr-list"), derivedState = require('./derived-states.js'), - uriBlacklistFilter = require('xss-filters')._privFilters.yubl, + yubl = require('xss-filters')._privFilters.yubl, + uriBlacklistFilter = function(s){ return yubl(s.replace(/\x00/g, '%00')); }, CssParser = require('css-js'), hrefAttribtues = tagAttList.HrefAttributes, voidElements = tagAttList.VoidElements;