Anchor preg. Props mrmist. fixes #8881 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@10481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-02-02 19:14:33 +00:00
parent 12676c8e03
commit 4ce0609b6d

View File

@ -168,7 +168,7 @@ if ( $links ) {
$link->link_name = attribute_escape($link->link_name);
$link->link_category = wp_get_link_cats($link->link_id);
$short_url = str_replace('http://', '', $link->link_url);
$short_url = str_replace('www.', '', $short_url);
$short_url = preg_replace('/^www./i', '', $short_url);
if ('/' == substr($short_url, -1))
$short_url = substr($short_url, 0, -1);
if (strlen($short_url) > 35)