TinyMCE wpView: prevent fatal (security) errors when trying to access iframe.contentWindow in pausePlayers() and unsetPlayers(). See #28905.
Built from https://develop.svn.wordpress.org/trunk@29202 git-svn-id: http://core.svn.wordpress.org/trunk@28986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d395142fb9
commit
d74a2a9f07
|
@ -132,6 +132,7 @@ window.wp = window.wp || {};
|
|||
frameBorder: '0',
|
||||
allowTransparency: 'true',
|
||||
scrolling: 'no',
|
||||
'class': 'wpview-sandbox',
|
||||
style: {
|
||||
width: '100%',
|
||||
display: 'block'
|
||||
|
@ -554,9 +555,10 @@ window.wp = window.wp || {};
|
|||
|
||||
pausePlayers: function() {
|
||||
this.getNodes( function( editor, node, content ) {
|
||||
var p, win = $( 'iframe', content ).get(0).contentWindow;
|
||||
var p, win,
|
||||
iframe = $( 'iframe.wpview-sandbox', content ).get(0);
|
||||
|
||||
if ( win && win.mejs ) {
|
||||
if ( iframe && ( win = iframe.contentWindow ) && win.mejs ) {
|
||||
for ( p in win.mejs.players ) {
|
||||
win.mejs.players[p].pause();
|
||||
}
|
||||
|
@ -566,9 +568,10 @@ window.wp = window.wp || {};
|
|||
|
||||
unsetPlayers: function() {
|
||||
this.getNodes( function( editor, node, content ) {
|
||||
var p, win = $( 'iframe', content ).get(0).contentWindow;
|
||||
var p, win,
|
||||
iframe = $( 'iframe.wpview-sandbox', content ).get(0);
|
||||
|
||||
if ( win && win.mejs ) {
|
||||
if ( iframe && ( win = iframe.contentWindow ) && win.mejs ) {
|
||||
for ( p in win.mejs.players ) {
|
||||
win.mejs.players[p].remove();
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.0-beta1-20140716';
|
||||
$wp_version = '4.0-beta1-20140717';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue