Query Loop Encoding Problem
-
Hello,
I found a bug with Query Loop Gutenberg Block when showing post full content. The returned content is not well encoded. I have some special character like this “?” and they are transformed to “??”.
But on admin page, and on single article page, everything is OK.
For fixed it, I needed to add this code :function custom_pre_render_block_filter($block_content, $block) {
if ($block['blockName'] === 'core/post-content') {
// Convertir les caractères spéciaux en entités HTML
$block_content = mb_convert_encoding($block_content, 'HTML-ENTITIES', 'UTF-8');
}
return $block_content;
}
add_filter('render_block', 'custom_pre_render_block_filter', 10, 2);
Do you have any idea ?
I think is probably a Javascript render encode problem ?
Thank you!
- The topic ‘Query Loop Encoding Problem’ is closed to new replies.