• Resolved ylfdth

    (@ylfdth)


    Hi,

    Im’ currently developping a plugin. I use Translatepress for my custom post types and I automatically add the translations into the db. Unfortunately, when I’m on any page, Translatepress grabs each string and add it in the db and for some reason changes some characters and encode it (eg. : ‘ (& apos ; ) becomes & rsquo ;, which is the html code for ’). How can I fix this? Or at least how can I encode my strings so it matches the way Translatepress inserts strings?

    Thanks,

    Yvan

    • This topic was modified 2 years, 8 months ago by ylfdth.
    • This topic was modified 2 years, 8 months ago by ylfdth.
    • This topic was modified 2 years, 8 months ago by ylfdth.
Viewing 1 replies (of 1 total)
  • Thread Starter ylfdth

    (@ylfdth)

    In case someone else faces the same problem, it’s not related to Translatepress but to WP. Simply add this to your functions.php :

    remove_filter(‘the_content’, ‘wptexturize’);
    remove_filter(‘the_title’, ‘wptexturize’);
    remove_filter(‘the_excerpt’, ‘wptexturize’);

Viewing 1 replies (of 1 total)
  • The topic ‘Encoding match’ is closed to new replies.