Make WordPress Core

Ticket #27858: 27858.diff

File 27858.diff, 565 bytes (added by elliott-stocks, 10 years ago)

First patch! This fixes the issue with images, though we may need to apply it to all elements.

  • src/wp-includes/class-wp-editor.php

    diff --git src/wp-includes/class-wp-editor.php src/wp-includes/class-wp-editor.php
    index b74e762..7dd0375 100644
    final class _WP_Editors { 
    646646                                'body_class' => $body_class
    647647                        );
    648648
     649                        if( current_user_can( 'unfiltered_html' ) ) {
     650                                $mceInit['extended_valid_elements'] = 'img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]';
     651                        }
     652
    649653                        if ( $first_run )
    650654                                $mceInit = array_merge( self::$first_init, $mceInit );
    651655