]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't "hightlight" search terms (by surrounding them in <strong>$term</strong>) when...
authorCraig Andrews <candrews@integralblue.com>
Tue, 8 Sep 2009 02:36:01 +0000 (22:36 -0400)
committerCraig Andrews <candrews@integralblue.com>
Tue, 8 Sep 2009 02:36:01 +0000 (22:36 -0400)
Fixes http://status.net/trac/ticket/1852

actions/noticesearch.php

index 1cd987df39736be5a0638bbd851291d27958f056..69dcd1a46c08d815f988d04e2eb1feed0409f61d 100644 (file)
@@ -198,7 +198,7 @@ class SearchNoticeListItem extends NoticeListItem {
         $result  = preg_replace($pattern, '<strong>\\1</strong>', $text);
 
         /* Remove highlighting from inside links, loop incase multiple highlights in links */
-        $pattern = '/(href="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
+        $pattern = '/(\w+="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
         do {
             $result = preg_replace($pattern, '\\1\\2\\3', $result, -1, $count);
         } while ($count);