Sfoglia il codice sorgente

handling JSVerify RNG state 89fdc94018a35b672e

El RIDO 8 anni fa
parent
commit
35ea65b797
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      js/test.js

+ 1 - 1
js/test.js

@@ -187,7 +187,7 @@ describe('Helper', function () {
             jsc.array(jsc.elements(queryString)),
             jsc.array(jsc.elements(queryString)),
             'string',
             'string',
             function (prefix, query, postfix) {
             function (prefix, query, postfix) {
-                var url = 'magnet:?' + query.join(''),
+                var url = 'magnet:?' + query.join('').replace(/^&+|&+$/gm,''),
                     prefix = $.PrivateBin.Helper.htmlEntities(prefix),
                     prefix = $.PrivateBin.Helper.htmlEntities(prefix),
                     postfix = $.PrivateBin.Helper.htmlEntities(postfix),
                     postfix = $.PrivateBin.Helper.htmlEntities(postfix),
                     element = $('<div>' + prefix + url + ' ' + postfix + '</div>');
                     element = $('<div>' + prefix + url + ' ' + postfix + '</div>');