Make WordPress Core

Ticket #17910: 17910.diff

File 17910.diff, 726 bytes (added by dd32, 14 years ago)

just for reference, my patch that doesnt include the html striping.

  • wp-admin/js/user-profile.dev.js

     
    5050
    5151                        $('option', select).remove();
    5252                        $.each(inputs, function( id, value ) {
    53                                 var selected;
    54 
    5553                                if ( inputs[id].length && $.inArray( value, dub ) == -1 ) {
    5654                                        dub.push(value);
    57                                         selected = id == current ? 'selected="selected"' : '';
    58                                         select.append('<option id="' + id + '" ' + selected + '">' + value + '</option>');
     55                                        $('<option />', {
     56                                                'id': id,
     57                                                'text': value,
     58                                                'selected': (id == current)
     59                                                }).appendTo( select );
    5960                                }
    6061                        });
    6162                });