[wp-trac] [WordPress Trac] #8419: get_sample_permalink_html not
multi-byte safe
WordPress Trac
wp-trac at lists.automattic.com
Fri Nov 28 23:26:23 GMT 2008
#8419: get_sample_permalink_html not multi-byte safe
----------------------------+-----------------------------------------------
Reporter: janbrasna | Owner: anonymous
Type: enhancement | Status: new
Priority: low | Milestone: 2.7
Component: Administration | Version: 2.7
Severity: minor | Keywords: utf multibyte
----------------------------+-----------------------------------------------
The code of get_sample_permalink_html()
{{{
if (strlen($post_name) > 30) {
$post_name_abridged = substr($post_name, 0, 14). '…' .
substr($post_name, -14);
}
}}}
in wp-admin/includes/post.php produces invalid string in case the input is
multi-byte. That doesn't happen in default, but might happen in case when
'editable_slug' filter changes the slug (e.g. #8418).
What's the consensus on mb_ functions? I've seen several cases of function
check in the code as
http://trac.wordpress.org/browser/trunk/wp-
includes/formatting.php?rev=9661#L513 but there are also cases like
http://trac.wordpress.org/browser/trunk/wp-
includes/formatting.php?rev=9661#L2071 when the presence of mb_ is not
checked at all.
--
Ticket URL: <http://trac.wordpress.org/ticket/8419>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list