From d011f4ef00e44ddedb347ff659fa59c1fc1b6bd2 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 10 Nov 2014 01:59:23 +0000 Subject: [PATCH] TinyMCE: remove strings that are not translated before outputting the translations. Fixes #27797. git-svn-id: https://develop.svn.wordpress.org/trunk@30294 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-editor.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index e92849c1f5..6e820d2ba3 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -976,6 +976,12 @@ final class _WP_Editors { $mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale ); foreach ( $mce_translation as $key => $value ) { + // Remove strings that are not translated. + if ( $key === $value ) { + unset( $mce_translation[$key] ); + continue; + } + if ( false !== strpos( $value, '&' ) ) { $mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' ); }