mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
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
This commit is contained in:
parent
ae6a59e782
commit
41683db2b4
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ class Hashtag {
|
|||
public static function getHashtags($status)
|
||||
{
|
||||
$hashtags = false;
|
||||
preg_match_all("/(#\w+)/u", $status, $matches);
|
||||
preg_match_all("/(?<!&)(#\w+)/u", $status, $matches);
|
||||
if ($matches) {
|
||||
$res = array_count_values($matches[0]);
|
||||
$hashtags = array_keys($res);
|
||||
|
|
Loading…
Reference in a new issue