From bab95cce1b6af37ead06e82eae32626643e94a96 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 4 Feb 2020 18:58:24 +0100 Subject: [PATCH] addressing false positive jsverify rngState 8bf7605ea139db4c28 --- js/test/I18n.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/test/I18n.js b/js/test/I18n.js index 585ee3e5..0491ad35 100644 --- a/js/test/I18n.js +++ b/js/test/I18n.js @@ -76,12 +76,12 @@ describe('I18n', function () { params[0] = params[0].replace(/%(s|d)/g, '%%'); postfix = postfix.replace(/%(s|d)/g, '%%'); const translation = DOMPurify.sanitize( - prefix + $.PrivateBin.Helper.htmlEntities(params[0]) + '' + postfix, { + prefix + '' + postfix, { ALLOWED_TAGS: ['a', 'i', 'span'], ALLOWED_ATTR: ['href', 'id'] } ); - params.unshift(prefix + '%s' + postfix); + params.unshift(prefix + '' + postfix); const result = $.PrivateBin.I18n.translate.apply(this, params); $.PrivateBin.I18n.reset(); const alias = $.PrivateBin.I18n._.apply(this, params); @@ -128,13 +128,13 @@ describe('I18n', function () { params[0] = params[0].replace(/%(s|d)/g, '%%').trim(); postfix = postfix.replace(/%(s|d)/g, '%%').trim(); const translation = DOMPurify.sanitize( - prefix + $.PrivateBin.Helper.htmlEntities(params[0]) + '' + postfix, { + prefix + '' + postfix, { ALLOWED_TAGS: ['a', 'i', 'span'], ALLOWED_ATTR: ['href', 'id'] } ); let args = Array.prototype.slice.call(params); - args.unshift(prefix + '%s' + postfix); + args.unshift(prefix + '' + postfix); let clean = jsdom(); $('body').html('
'); args.unshift($('#i18n'));