WordPress.org

Make WordPress Core

Changeset 31621


Ignore:
Timestamp:
03/05/2015 12:35:10 PM (6 years ago)
Author:
azaozz
Message:

TinyMCE wpView: revert decoding of HTML entities. Doesn't work in old IE and needs to be more selective. Keep the change from .html() to .text() when getting the content of a node. See #31412.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/mce-view.js

    r31620 r31621  
    2929
    3030    var views = {},
    31         instances = {},
    32         textarea = document.createElement( 'textarea' );
     31        instances = {};
    3332
    3433    wp.mce = wp.mce || {};
    35 
    36     /**
    37      * Decode HTML entities in a givin string.
    38      *
    39      * @param {String} html The string to decode.
    40      */
    41     function decodeHTML( html ) {
    42         textarea.innerHTML = html;
    43         html = textarea.value;
    44 
    45         textarea.innerHTML = textarea.value = '';
    46 
    47         return html;
    48     }
    4934
    5035    /**
     
    10590         */
    10691        setMarkers: function( content ) {
    107             var pieces = [ { content: decodeHTML( content ) } ],
     92            var pieces = [ { content: content } ],
    10893                self = this,
    10994                current;
Note: See TracChangeset for help on using the changeset viewer.