Przeglądaj źródła

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 rok temu
rodzic
commit
ac63b91a1b
1 zmienionych plików z 1 dodań i 1 usunięć
  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',
             'returns the contents of the password input',
             'string',
             'string',
             function (password) {
             function (password) {
-                password = password.replace(/\r+/g, '');
+                password = password.replace(/\r+|\n+/g, '');
                 var results = [];
                 var results = [];
                 $('body').html(
                 $('body').html(
                     '<nav><div id="navbar"><ul><li><div id="password" ' +
                     '<nav><div id="navbar"><ul><li><div id="password" ' +