[Plugin: WordPress SEO by Yoast] [Bug Report] Unicode encoding in meta description
-
I have a Vietnamese website. When using this plugin with auto generated meta description, I receive result like this:
Transcend JetFlash Recovery Tool là ph?n m?m chuyên d?ng dùng ?? kh?i ph?c nh?ng d? li?u ?? m?t c?a th? nh?. Ph?n m?m này do h?ng Trancend phát hành, ?ay l
After looking into the code of the plugin, I found this (
inc/wpseo-functions.php
):( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : utf8_encode( substr( strip_shortcodes( strip_tags( utf8_decode( $r->post_content ) ) ), 0, 155 ) )
This is not correct for some language, including Vietnamese (an utf-8 one). Actually, Vietnamese works with simpler code:
( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155 )
e.g. without encoding, decoding functions.
Hope this fix will be included in new version.
- The topic ‘[Plugin: WordPress SEO by Yoast] [Bug Report] Unicode encoding in meta description’ is closed to new replies.