Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x

This commit is contained in:
Evan Prodromou
2009-08-27 14:18:51 -07:00
7 changed files with 283 additions and 22 deletions

View File

@@ -413,7 +413,7 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
// Start off with a regex
$regex = '#'.
'(?:^|[\s\(\)\[\]\{\}\\\'\\\";]+)(?![\@\!\#])'.
'(?P<url>'.
'('.
'(?:'.
'(?:'. //Known protocols
'(?:'.
@@ -454,7 +454,7 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
}
function callback_helper($matches, $callback, $notice_id) {
$url=$matches['url'];
$url=$matches[1];
$left = strpos($matches[0],$url);
$right = $left+strlen($url);