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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31621 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-03-05 12:35:10 +00:00
parent 4726669b3f
commit 889edda453
1 changed files with 2 additions and 17 deletions

View File

@ -28,25 +28,10 @@ window.wp = window.wp || {};
'use strict';
var views = {},
instances = {},
textarea = document.createElement( 'textarea' );
instances = {};
wp.mce = wp.mce || {};
/**
* Decode HTML entities in a givin string.
*
* @param {String} html The string to decode.
*/
function decodeHTML( html ) {
textarea.innerHTML = html;
html = textarea.value;
textarea.innerHTML = textarea.value = '';
return html;
}
/**
* wp.mce.views
*
@ -104,7 +89,7 @@ window.wp = window.wp || {};
* @param {String} content The string to scan.
*/
setMarkers: function( content ) {
var pieces = [ { content: decodeHTML( content ) } ],
var pieces = [ { content: content } ],
self = this,
current;