From 093b6b5d116044f56a99d45778419f03ca32c4f6 Mon Sep 17 00:00:00 2001 From: Ella Iseulde Van Dorpe Date: Fri, 16 Oct 2015 05:42:22 +0000 Subject: [PATCH] TinyMCE: make sure markers are removed after first init This is only relevant to non embeddable URLs. After first init, markers were set but not removed, causing an edited URL to revert when switching to text mode or any paragraph after the URL to just contain that URL. Fixes #33954. git-svn-id: https://develop.svn.wordpress.org/trunk@35216 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/mce-view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index c0ae668062..5e21b4f5ca 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -120,7 +120,7 @@ // Add the processed piece for the match. pieces.push( { - content: '

' + text + '

', + content: instance.ignore ? text : '

' + text + '

', processed: true } ); @@ -816,6 +816,7 @@ } ) .fail( function( response ) { if ( self.url ) { + self.ignore = true; self.removeMarkers(); } else { self.setError( response.message || response.statusText, 'admin-media' );