Преглед изворни кода

fix prompt test

rngState 883a6d2e518704c9fb fails on a single \n (line feed)

password inputs can't contain carriage returns *or* line feeds
El RIDO пре 1 година
родитељ
комит
ac63b91a1b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      js/test/TopNav.js

+ 1 - 1
js/test/TopNav.js

@@ -621,7 +621,7 @@ describe('TopNav', function () {
             'returns the contents of the password input',
             'string',
             function (password) {
-                password = password.replace(/\r+/g, '');
+                password = password.replace(/\r+|\n+/g, '');
                 var results = [];
                 $('body').html(
                     '<nav><div id="navbar"><ul><li><div id="password" ' +