From 41aee80664002d39f0084af82345d7fecc83630d 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 8325f00..3ce0bfd 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'), hrefAttributes = tagAttList.HrefAttributes, voidElements = tagAttList.VoidElements;