From 69106a5971cef967865a8a7aed5c9cd6da1afdf3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 11 Nov 2015 22:48:22 +0000 Subject: [PATCH] I18N: In `Translations::translate_entry()`, account for multi-line strings in files with Windows line endings. Fixes #22172. git-svn-id: https://develop.svn.wordpress.org/trunk@35620 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pomo/translations.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/pomo/translations.php b/src/wp-includes/pomo/translations.php index 6008f4aa18..aaf9a35550 100644 --- a/src/wp-includes/pomo/translations.php +++ b/src/wp-includes/pomo/translations.php @@ -82,6 +82,7 @@ class Translations { */ function translate_entry(&$entry) { $key = $entry->key(); + $key = str_replace( "\r\n", "\n", $key ); return isset($this->entries[$key])? $this->entries[$key] : false; }