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.
Built from https://develop.svn.wordpress.org/trunk@31621 git-svn-id: http://core.svn.wordpress.org/trunk@31602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cc953717b7
commit
36610e072b
|
@ -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;
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31620';
|
||||
$wp_version = '4.2-alpha-31621';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue