Better pingback extraction, fixes #1268

git-svn-id: http://svn.automattic.com/wordpress/trunk@2619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt
2005-06-04 10:15:36 +00:00
parent 084361c8ac
commit c65f0168cd
2 changed files with 42 additions and 71 deletions

View File

@@ -591,20 +591,6 @@ function is_email($user_email) {
}
}
function strip_all_but_one_link($text, $mylink) {
$match_link = '#(<a.+?href.+?'.'>)(.+?)(</a>)#';
preg_match_all($match_link, $text, $matches);
$count = count($matches[0]);
for ($i=0; $i<$count; $i++) {
if (!strstr($matches[0][$i], $mylink)) {
$text = str_replace($matches[0][$i], $matches[2][$i], $text);
}
}
return $text;
}
// used by wp-mail to handle charsets in email subjects
function wp_iso_descrambler($string) {
/* this may only work with iso-8859-1, I'm afraid */
@@ -990,4 +976,4 @@ function ent2ncr($text) {
return $text;
}
?>
?>