TinyMCE: restore support for <script> tags.

See #33083.

git-svn-id: https://develop.svn.wordpress.org/trunk@33414 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-07-24 22:03:25 +00:00
parent cac1d55621
commit 45e535b23d

View File

@ -485,8 +485,13 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
});
editor.on( 'preInit', function() {
// Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty
editor.schema.addValidElements( '@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b' );
var validElementsSetting = '@[id|accesskey|class|dir|lang|style|tabindex|' +
'title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],' + // Global attributes.
'i,' + // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty.
'b,' +
'script[src|async|defer|type|charset|crossorigin|integrity]'; // Add support for <script>.
editor.schema.addValidElements( validElementsSetting );
if ( tinymce.Env.iOS ) {
editor.settings.height = 300;