tell tinymce to also allow <script> tags
This commit is contained in:
@@ -448,9 +448,9 @@ add_action('admin_init', 'roots_notice_tagline_ignore');
|
|||||||
// was set in wp-config.php to avoid DB bloat
|
// was set in wp-config.php to avoid DB bloat
|
||||||
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 5);
|
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 5);
|
||||||
|
|
||||||
// allow more tags in TinyMCE including iframes
|
// allow more tags in TinyMCE including <iframe> and <script>
|
||||||
function roots_change_mce_options($options) {
|
function roots_change_mce_options($options) {
|
||||||
$ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';
|
$ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src],script[charset|defer|language|src|type]';
|
||||||
if (isset($initArray['extended_valid_elements'])) {
|
if (isset($initArray['extended_valid_elements'])) {
|
||||||
$options['extended_valid_elements'] .= ',' . $ext;
|
$options['extended_valid_elements'] .= ',' . $ext;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user