From 14ed6963a23318d6469da2ddd1af7665b54d95c8 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 26 Aug 2017 16:34:00 +0000 Subject: [PATCH] TinyMCE: fix cases where an additional empty link is created while updating an image with a link. Props spocke. Fixes #41259. git-svn-id: https://develop.svn.wordpress.org/trunk@41319 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js index fc39aba6b9..9ffaba102a 100644 --- a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js @@ -331,7 +331,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { } function hasTextContent( node ) { - return node && !! ( node.textContent || node.innerText ); + return node && !! ( node.textContent || node.innerText ).replace( /\ufeff/g, '' ); } // Verify HTML in captions