From ebb9af8946b68a545d9a7b5a6763721627a981f7 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 9 Sep 2011 17:35:26 -0700 Subject: [PATCH] One day we'll have ignored all purely numeric hashtags like #33. Found yet another edge case. --- include/text.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/text.php b/include/text.php index 536c998de6..33add768f8 100644 --- a/include/text.php +++ b/include/text.php @@ -482,13 +482,12 @@ function get_tags($s) { // we might be inside a bbcode color tag - leave it alone continue; } + if(substr($mtch,-1,1) === '.') + $mtch = substr($mtch,0,-1); // ignore strictly numeric tags like #1 if((strpos($mtch,'#') === 0) && ctype_digit(substr($mtch,1))) continue; - if(substr($mtch,-1,1) === '.') - $ret[] = substr($mtch,0,-1); - else - $ret[] = $mtch; + $ret[] = $mtch; } } return $ret;