summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authormillette <millette@controlyourself.ca>2008-11-07 15:30:39 -0500
committermillette <millette@controlyourself.ca>2008-11-07 15:30:39 -0500
commit9c3eb0d3619dcc469cba9bda07a3df8a72628320 (patch)
treec10622ae09b12c18417e1a52e9fc63df5120021a /lib/util.php
parent397177243274f3a44ab05005a8290c37b9c7907e (diff)
trac31 don't shorten URLs prefixed with a *
darcs-hash:20081107203039-099f7-a059dab8d6b7909c309eacf5ef929408c3c6c6e0.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index 4f93d572e..364e9e79c 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -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;
}