trac31 don't shorten URLs prefixed with a *

darcs-hash:20081107203039-099f7-a059dab8d6b7909c309eacf5ef929408c3c6c6e0.gz
This commit is contained in:
millette 2008-11-07 15:30:39 -05:00
parent 3971772432
commit 9c3eb0d361
1 changed files with 2 additions and 1 deletions

View File

@ -749,7 +749,8 @@ function common_render_uri_thingy($matches) {
function common_shorten_links($text) {
$r = htmlspecialchars($text);
$r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
// \s = not a horizontal whitespace character (since PHP 5.2.4)
$r = preg_replace('@[^*]https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
return $r;
}