From 362e24eca7f9dc96a68c7157c993d850afcad567 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 22 Aug 2014 00:13:07 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/mce-view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index 3758e9c7a7..3ce42e9000 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -561,6 +561,8 @@ window.wp = window.wp || {}; setNodes: function () { if ( this.parsed ) { this.setIframes( this.parsed ); + } else if ( this.parsed === false ) { + this.setContent( '

' + this.original + '

', '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;