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

Built from https://develop.svn.wordpress.org/trunk@29571


git-svn-id: http://core.svn.wordpress.org/trunk@29345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-22 00:14:17 +00:00
parent c3c20549c5
commit 5545f24b4f
2 changed files with 6 additions and 1 deletions

View File

@ -561,6 +561,8 @@ window.wp = window.wp || {};
setNodes: function () { setNodes: function () {
if ( this.parsed ) { if ( this.parsed ) {
this.setIframes( 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() shortcode: this.shortcode.string()
} }
} ) } )
.always( function() {
self.parsed = false;
} )
.done( function( response ) { .done( function( response ) {
if ( response ) { if ( response ) {
self.parsed = response; self.parsed = response;

File diff suppressed because one or more lines are too long