From: Sean Murphy Date: Thu, 5 Feb 2009 01:02:50 +0000 (-0500) Subject: Fixed #732; Hashtags inside parens and brackets. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0f12d6135ea21f3cd55aea0d12b1680cbb81d7e9;p=quix0rs-gnu-social.git Fixed #732; Hashtags inside parens and brackets. --- diff --git a/lib/util.php b/lib/util.php index 07e124811e..c26ca6b627 100644 --- a/lib/util.php +++ b/lib/util.php @@ -388,7 +388,7 @@ function common_render_text($text) $r = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r); $r = preg_replace_callback('@(ftp|http|https|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|xmpp|irc)://[^\]>\s]+@', 'common_render_uri_thingy', $r); $r = preg_replace_callback('@(mailto|aim|tel):[^\]>\s]+@', 'common_render_uri_thingy', $r); // Pseudo-protocols don't require '//' after ':'. - $r = preg_replace('/(^|\s+)#([A-Za-z0-9_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); + $r = preg_replace('/(^|\(|\[|\s+)#([A-Za-z0-9_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); // XXX: machine tags return $r; }