mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Customizer: Ensure we have a string that's JSON parseable.
props mattwiebe. fixes #postmessage-check.diff. Built from https://develop.svn.wordpress.org/trunk@26542 git-svn-id: http://core.svn.wordpress.org/trunk@26434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3fe7726bd4
commit
67c504cf23
@ -533,6 +533,11 @@ window.wp = window.wp || {};
|
||||
if ( this.origin() && event.origin !== this.origin() )
|
||||
return;
|
||||
|
||||
// Ensure we have a string that's JSON.parse-able
|
||||
if ( typeof event.data !== 'string' || event.data[0] !== '{' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
message = JSON.parse( event.data );
|
||||
|
||||
// Check required message properties.
|
||||
|
2
wp-includes/js/customize-base.min.js
vendored
2
wp-includes/js/customize-base.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user