| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * A fully static class to manage strings translations on admin side |
| 8 | 5 | * |
| @@ -120,8 +117,9 @@ | ||
| 120 | 117 | * @param string $name unique name for the string |
| 121 | 118 | * @return string |
| 122 | 119 | */ |
| 123 | 120 | public static function sanitize_string_translation( $translation, $name ) { |
| 121 | + $translation = wp_unslash( trim( $translation ) ); | |
| 124 | 122 | |
| 125 | 123 | if ( false !== ( $option = array_search( $name, self::$default_strings['options'], true ) ) ) { |
| 126 | 124 | $translation = sanitize_option( $option, $translation ); |
| 127 | 125 | } |