This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're trying to use the automatic translation to translate your website into French and you notice that HTML entities like apostrophes are displaying incorrectly (e.g., '@apos;') within the Divi accordion toggle.
Solution:
We recommend adding the following custom PHP code to your theme's functions.php file or a site-specific plugin:
// WPML workaround for compsupp-7001<br />add_filter('do_shortcode_tag', 'wpml_compsupp7001_decode_et_pb_button_text', 10, 4);<br /> <br />function wpml_compsupp7001_decode_et_pb_button_text($output, $tag, $attr, $m) {<br /> if ( class_exists('Sitepress') && 'et_pb_button' === $tag && isset($attr['button_text'])) {<br /> // Decode both the ampersand and the apostrophe<br /> $output = html_entity_decode($output, ENT_QUOTES, 'UTF-8');<br /> }<br /> if ( class_exists('Sitepress') && 'et_pb_accordion_item' === $tag && isset($attr['title'])) {<br /> // Decode both the ampersand and the apostrophe<br /> $output = html_entity_decode($output, ENT_QUOTES, 'UTF-8');<br /> }<br /> <br /> return $output;<br />}<br />
This code should resolve the issue by decoding HTML entities for the button text and accordion item titles.
If this solution doesn't look relevant to your issue, please open a new support ticket with us.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.