Combat Chrome's insanely aggressive user/pass autofilling ಠ_ಠ

Chrome now ignores `autocomplete="off"` in <input>, so this hack uses
a hidden, non-named, non-empty input, right before the password field.

see #24364. props azaozz, nacin, bobbingwide, aaroncampbell.

git-svn-id: http://core.svn.wordpress.org/trunk@24552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-07-03 21:24:02 +00:00
parent 5b8aad1039
commit bd94dc655c
2 changed files with 2 additions and 0 deletions

View File

@ -377,6 +377,7 @@ if ( $show_password_fields ) :
<tr id="password">
<th><label for="pass1"><?php _e('New Password'); ?></label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /> <span class="description"><?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?></span>
</td>
</tr>

View File

@ -342,6 +342,7 @@ foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_nam
<tr class="form-field form-required">
<th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php /* translators: password input field */_e('(required)'); ?></span></label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<input name="pass1" type="password" id="pass1" autocomplete="off" />
</td>
</tr>