WordPress.org

Making WordPress.org

Ticket #3173: 3173.diff

File 3173.diff, 936 bytes (added by Mirucon, 3 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php

     
    408408        public function translate_gp_original( $original, $translation, $content ) {
    409409                $original = preg_quote( $original, '/' );
    410410
    411                 if ( false === strpos( $content, '<' ) ) {
     411                if ( false === strpos( $content, '/' ) ) {
     412                        $content = str_replace( $original, '___TRANSLATION___', $content );
     413                } elseif ( false === strpos( $content, '<' ) ) {
    412414                        // Don't use $translation, it may contain backreference-like characters.
    413415                        $content = preg_replace( "/\b{$original}\b/", '___TRANSLATION___', $content );
    414416                } else {