Make WordPress Core

Changeset 33414


Ignore:
Timestamp:
07/24/2015 10:03:25 PM (11 years ago)
Author:
azaozz
Message:

TinyMCE: restore support for <script> tags.
See #33083.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r33294 r33414  
    486486
    487487    editor.on( 'preInit', function() {
    488         // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty
    489         editor.schema.addValidElements( '@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b' );
     488        var validElementsSetting = '@[id|accesskey|class|dir|lang|style|tabindex|' +
     489            'title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],' + // Global attributes.
     490            'i,' + // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty.
     491            'b,' +
     492            'script[src|async|defer|type|charset|crossorigin|integrity]'; // Add support for <script>.
     493
     494        editor.schema.addValidElements( validElementsSetting );
    490495
    491496        if ( tinymce.Env.iOS ) {
Note: See TracChangeset for help on using the changeset viewer.