Multibyte String Bug Fix on Description
-
This plugin has a bug about multibyte description string.
It will be fixed by this change.Before
if ( strlen ( $description ) > 255 ) $description = substr ( $description, 0, 252 ) . '...';
After
if(extension_loaded('mbstring')) { $current_encoding = mb_detect_encoding($description, get_bloginfo('charset')); if(mb_strlen($description, $current_encoding) > 255) { $description = mb_substr($description, 0, 252, $current_encoding) . '...'; } } else { if(strlen($description) > 255) { $description = substr ( $description, 0, 252 ) . '...'; } }
- The topic ‘Multibyte String Bug Fix on Description’ is closed to new replies.