address jsverify rngState 87ab3f64de258190c7, fixes #1139
This commit is contained in:
parent
405479642f
commit
4e62e1f6ef
@ -27,13 +27,13 @@ describe('PasteStatus', function () {
|
|||||||
common.jscUrl(),
|
common.jscUrl(),
|
||||||
common.jscUrl(false),
|
common.jscUrl(false),
|
||||||
function (url1, url2) {
|
function (url1, url2) {
|
||||||
const expected1 = common.urlToString(url1),
|
const expected1 = common.urlToString(url1).replace(/&(gt|lt)$/, '&$1a'),
|
||||||
expected2 = common.urlToString(url2),
|
expected2 = common.urlToString(url2).replace(/&(gt|lt)$/, '&$1a'),
|
||||||
clean = jsdom();
|
clean = jsdom();
|
||||||
$('body').html('<div><div id="deletelink"></div><div id="pastelink"></div></div>');
|
$('body').html('<div><div id="deletelink"></div><div id="pastelink"></div></div>');
|
||||||
$.PrivateBin.PasteStatus.init();
|
$.PrivateBin.PasteStatus.init();
|
||||||
$.PrivateBin.PasteStatus.createPasteNotification(expected1, expected2);
|
$.PrivateBin.PasteStatus.createPasteNotification(expected1, expected2);
|
||||||
var result1 = $('#pasteurl')[0].href,
|
const result1 = $('#pasteurl')[0].href,
|
||||||
result2 = $('#deletelink a')[0].href;
|
result2 = $('#deletelink a')[0].href;
|
||||||
clean();
|
clean();
|
||||||
return result1 === expected1 && result2 === expected2;
|
return result1 === expected1 && result2 === expected2;
|
||||||
@ -50,7 +50,7 @@ describe('PasteStatus', function () {
|
|||||||
'nestring',
|
'nestring',
|
||||||
common.jscUrl(),
|
common.jscUrl(),
|
||||||
function (schema, domain, url) {
|
function (schema, domain, url) {
|
||||||
domain = domain.replace(/\P{Letter}|[\u00AA-\u00BA]/gu,'').toLowerCase();
|
domain = domain.replace(/\P{Letter}|[\u00AA-\u00BA]/gu, '').toLowerCase();
|
||||||
if (domain.length === 0) {
|
if (domain.length === 0) {
|
||||||
domain = 'a';
|
domain = 'a';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user