DOMpurify strips line tabulation characters (\u000b), adresses jsverifyRngState 8f6fbd749c3852ea01

This commit is contained in:
El RIDO 2020-06-07 07:58:07 +02:00
parent 8fcc321eb6
commit cb0faf690c
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ describe('Helper', function () {
'ignores non-URL content', 'ignores non-URL content',
'string', 'string',
function (content) { function (content) {
content = content.replace(/\r/g, '\n').replace(/\u0000/g, ''); content = content.replace(/\r/g, '\n').replace(/\u0000/g, '').replace(/\u000b/g, '');
let clean = jsdom(); let clean = jsdom();
$('body').html('<div id="foo"></div>'); $('body').html('<div id="foo"></div>');
let e = $('#foo'); let e = $('#foo');
@ -104,7 +104,7 @@ describe('Helper', function () {
function (prefix, schema, address, query, fragment, postfix) { function (prefix, schema, address, query, fragment, postfix) {
query = query.join(''); query = query.join('');
fragment = fragment.join(''); fragment = fragment.join('');
prefix = prefix.replace(/\r/g, '\n').replace(/\u0000/g, ''); prefix = prefix.replace(/\r/g, '\n').replace(/\u0000/g, '').replace(/\u000b/g, '');
postfix = ' ' + postfix.replace(/\r/g, '\n').replace(/\u0000/g, ''); postfix = ' ' + postfix.replace(/\r/g, '\n').replace(/\u0000/g, '');
let url = schema + '://' + address.join('') + '/?' + query + '#' + fragment, let url = schema + '://' + address.join('') + '/?' + query + '#' + fragment,
clean = jsdom(); clean = jsdom();
@ -134,7 +134,7 @@ describe('Helper', function () {
jsc.array(common.jscQueryString()), jsc.array(common.jscQueryString()),
'string', 'string',
function (prefix, query, postfix) { function (prefix, query, postfix) {
prefix = prefix.replace(/\r/g, '\n').replace(/\u0000/g, ''); prefix = prefix.replace(/\r/g, '\n').replace(/\u0000/g, '').replace(/\u000b/g, '');
postfix = ' ' + postfix.replace(/\r/g, '\n').replace(/\u0000/g, ''); postfix = ' ' + postfix.replace(/\r/g, '\n').replace(/\u0000/g, '');
let url = 'magnet:?' + query.join('').replace(/^&+|&+$/gm,''), let url = 'magnet:?' + query.join('').replace(/^&+|&+$/gm,''),
clean = jsdom(); clean = jsdom();