Make WordPress Core


Ignore:
Timestamp:
07/13/2015 03:18:47 AM (10 years ago)
Author:
azaozz
Message:

TinyMCE:

  • Go back to encoding the editor content only when TinyMCE is used.
  • Add check and encode </textarea> if present.

See #32425.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r33148 r33187  
    30883088 */
    30893089function format_for_editor( $text, $default_editor = null ) {
    3090     // Back-compat: check if any characters need encoding.
    3091     if ( ! empty( $text ) && ( false !== strpos( $text, '<' ) || false !== strpos( $text, '>' ) ||
    3092         preg_match( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', $text ) ) ) {
    3093 
     3090    if ( $text ) {
    30943091        $text = htmlspecialchars( $text, ENT_NOQUOTES, get_option( 'blog_charset' ) );
    30953092    }
Note: See TracChangeset for help on using the changeset viewer.