From 71c76adac4abd198dfbc4221e61c8007fd37365f Mon Sep 17 00:00:00 2001 From: El RIDO Date: Fri, 6 Mar 2020 23:00:48 +0100 Subject: [PATCH] addressing false positive jsverify rngState 077c06da821594b3fe --- js/test/Helper.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/test/Helper.js b/js/test/Helper.js index ab7638e..b8f6aa2 100644 --- a/js/test/Helper.js +++ b/js/test/Helper.js @@ -81,7 +81,7 @@ describe('Helper', function () { 'ignores non-URL content', 'string', function (content) { - content = content.replace("\r", "\n").replace("\u0000", ''); + content = content.replace(/\r/g, '\n').replace(/\u0000/g, ''); let clean = jsdom(); $('body').html('
'); let e = $('#foo'); @@ -103,8 +103,8 @@ describe('Helper', function () { function (prefix, schema, address, query, fragment, postfix) { query = query.join(''); fragment = fragment.join(''); - prefix = prefix.replace("\r", "\n").replace("\u0000", ''); - postfix = ' ' + postfix.replace("\r", "\n").replace("\u0000", ''); + prefix = prefix.replace(/\r/g, '\n').replace(/\u0000/g, ''); + postfix = ' ' + postfix.replace(/\r/g, '\n').replace(/\u0000/g, ''); let url = schema + '://' + address.join('') + '/?' + query + '#' + fragment, clean = jsdom(); $('body').html('
'); @@ -133,8 +133,8 @@ describe('Helper', function () { jsc.array(common.jscQueryString()), 'string', function (prefix, query, postfix) { - prefix = prefix.replace("\r", "\n").replace("\u0000", ''); - postfix = ' ' + postfix.replace("\r", "\n").replace("\u0000", ''); + prefix = prefix.replace(/\r/g, '\n').replace(/\u0000/g, ''); + postfix = ' ' + postfix.replace(/\r/g, '\n').replace(/\u0000/g, ''); let url = 'magnet:?' + query.join('').replace(/^&+|&+$/gm,''), clean = jsdom(); $('body').html('
');