summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-09-07 22:36:01 -0400
committerCraig Andrews <candrews@integralblue.com>2009-09-07 22:36:01 -0400
commit6020d85191bdd838acbeb40ab17035e378b0aee1 (patch)
treef2a274c35e01ca769d645af9f863d592846cacaf /actions
parentc77c0d88cea4b26c9ede432eea728c2af72d2821 (diff)
Don't "hightlight" search terms (by surrounding them in <strong>$term</strong>) when the term appears in an HTML attribute
Fixes http://status.net/trac/ticket/1852
Diffstat (limited to 'actions')
-rw-r--r--actions/noticesearch.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php
index 1cd987df3..69dcd1a46 100644
--- a/actions/noticesearch.php
+++ b/actions/noticesearch.php
@@ -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);