Index: trunk/phase3/skins/common/password.js |
— | — | @@ -31,15 +31,9 @@ |
32 | 32 | if ( matches ) { |
33 | 33 | charClasses++; |
34 | 34 | |
| 35 | + var s = matches.join( '' ); |
35 | 36 | // poor man's isUpper() and isLower() |
36 | | - var i, lower = false, upper = false; |
37 | | - for ( i in matches ) { |
38 | | - var ch = matches[i]; |
39 | | - upper |= ch != ch.toLowerCase(); |
40 | | - lower |= ch != ch.toUpperCase(); |
41 | | - if ( upper && lower ) break; |
42 | | - } |
43 | | - if ( upper && lower ) { |
| 37 | + if ( s != s.toLowerCase() && s != s.toUpperCase() ) { |
44 | 38 | charClasses++; |
45 | 39 | } |
46 | 40 | } |