From 41683db2b4bd8efe6c4c93e97e73989454dc35c5 Mon Sep 17 00:00:00 2001 From: Derek Schmidt Date: Fri, 1 Jun 2018 23:58:23 -0700 Subject: [PATCH] Ignore hashtags that begin with a ampersand Fixes #131 This is usually a marker of an HTML entity code. It is possible for a user to do this on purpose, but not horribly likely. i hope --- app/Util/Lexer/Hashtag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Util/Lexer/Hashtag.php b/app/Util/Lexer/Hashtag.php index 9f19ed89..3b27f0dd 100644 --- a/app/Util/Lexer/Hashtag.php +++ b/app/Util/Lexer/Hashtag.php @@ -7,7 +7,7 @@ class Hashtag { public static function getHashtags($status) { $hashtags = false; - preg_match_all("/(#\w+)/u", $status, $matches); + preg_match_all("/(?