TinyMCE wpView: prevent errors when pasting multiple non-embeddable URLs, props avryl, fixes #29268

git-svn-id: https://develop.svn.wordpress.org/trunk@29571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-08-22 00:13:07 +00:00
parent 208645191d
commit 362e24eca7
1 changed files with 5 additions and 0 deletions

View File

@ -561,6 +561,8 @@ window.wp = window.wp || {};
setNodes: function () {
if ( this.parsed ) {
this.setIframes( this.parsed );
} else if ( this.parsed === false ) {
this.setContent( '<p>' + this.original + '</p>', 'replace' );
}
},
@ -574,6 +576,9 @@ window.wp = window.wp || {};
shortcode: this.shortcode.string()
}
} )
.always( function() {
self.parsed = false;
} )
.done( function( response ) {
if ( response ) {
self.parsed = response;