WordPress.org

Make WordPress Core

Changeset 24552


Ignore:
Timestamp:
07/03/13 21:24:02 (10 months ago)
Author:
markjaquith
Message:

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.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r24551 r24552  
    378378    <th><label for="pass1"><?php _e('New Password'); ?></label></th> 
    379379    <td> 
     380        <input class="hidden" value=" " /><!-- #24364 workaround --> 
    380381        <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> 
    381382    </td> 
  • trunk/wp-admin/user-new.php

    r24551 r24552  
    343343        <th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php /* translators: password input field */_e('(required)'); ?></span></label></th> 
    344344        <td> 
     345            <input class="hidden" value=" " /><!-- #24364 workaround --> 
    345346            <input name="pass1" type="password" id="pass1" autocomplete="off" /> 
    346347        </td> 
Note: See TracChangeset for help on using the changeset viewer.