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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ella Iseulde Van Dorpe 2015-10-16 05:43:26 +00:00
parent fc02ca2d01
commit ef01315cac
3 changed files with 4 additions and 3 deletions

View File

@ -120,7 +120,7 @@
// Add the processed piece for the match.
pieces.push( {
content: '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
content: instance.ignore ? text : '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
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' );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-35215';
$wp_version = '4.4-alpha-35216';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.