mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
TinyMCE:
- Go back to encoding the editor content only when TinyMCE is used. - Add check and encode `</textarea>` if present. See #32425. git-svn-id: https://develop.svn.wordpress.org/trunk@33187 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -251,6 +251,11 @@ final class _WP_Editors {
|
||||
'<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' .
|
||||
'id="' . $editor_id_attr . '">%s</textarea></div>' );
|
||||
|
||||
// Prepare the content for the Visual or Text editor
|
||||
if ( self::$this_tinymce ) {
|
||||
add_filter( 'the_editor_content', 'format_for_editor', 10, 2 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the default editor content.
|
||||
*
|
||||
@@ -270,6 +275,10 @@ final class _WP_Editors {
|
||||
$content = apply_filters( 'richedit_pre', $content );
|
||||
}
|
||||
|
||||
if ( false !== stripos( $content, 'textarea' ) ) {
|
||||
$content = preg_replace( '%</textarea%i', '</textarea', $content );
|
||||
}
|
||||
|
||||
printf( $the_editor, $content );
|
||||
echo "\n</div>\n\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user