diff --git delicious.inc delicious.inc index e1a5e7c..4c5f996 100644 --- delicious.inc +++ delicious.inc @@ -201,10 +201,9 @@ function _delicious_tag_string($text, $tags, $username) { $www_regex = '(www\.[a-zA-Z0-9@:%_+*~#?&=.,/;-]*[a-zA-Z0-9@:%_+~#\&=/;-])'; // Replace all URLs, Domains, and e-mail address with tokens. - $i = 1; $replacements = array(); while (preg_match("`($url_regex|$mail_regex|$www_regex)`i", $text, $matches)) { - $token = '__delicious_processing_replacement_'. $i++; + $token = '__delicious_processing_'. md5($matches[1]); $replacements[$token] = $matches[1]; $text = str_replace($matches[1], $token, $text); }