From 65011019b7c7dc604271976c3dc61e94d6a202b0 Mon Sep 17 00:00:00 2001 From: Haocen Xu Date: Tue, 2 Jun 2020 08:50:14 -0400 Subject: [PATCH] Fix urls2links unit test --- js/privatebin.js | 2 +- js/test/Helper.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 1170804a..6826da4a 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -408,7 +408,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { DOMPurify.sanitize( element.html().replace( /(((https?|ftp):\/\/[\w?!=&.\/-;#@~%+*-]+(?![\w\s?!&.\/;#~%"=-]>))|((magnet):[\w?=&.\/-;#@~%+*-]+))/ig, - '$1' + '$1' ) ) ); diff --git a/js/test/Helper.js b/js/test/Helper.js index f58d73ab..2382c83c 100644 --- a/js/test/Helper.js +++ b/js/test/Helper.js @@ -125,7 +125,7 @@ describe('Helper', function () { let result = e.html(); clean(); url = $('
').text(url).html(); - return $('
').text(prefix).html() + '' + url + '' + $('
').text(postfix).html() === result; + return $('
').text(prefix).html() + '' + url + '' + $('
').text(postfix).html() === result; } ); jsc.property( @@ -145,7 +145,7 @@ describe('Helper', function () { let result = e.html(); clean(); url = $('
').text(url).html(); - return $('
').text(prefix).html() + '' + url + '' + $('
').text(postfix).html() === result; + return $('
').text(prefix).html() + '' + url + '' + $('
').text(postfix).html() === result; } ); });