diff --git a/app/Jobs/StatusPipeline/StatusEntityLexer.php b/app/Jobs/StatusPipeline/StatusEntityLexer.php index ecad11e1e..beda89bd5 100644 --- a/app/Jobs/StatusPipeline/StatusEntityLexer.php +++ b/app/Jobs/StatusPipeline/StatusEntityLexer.php @@ -89,6 +89,9 @@ class StatusEntityLexer implements ShouldQueue $status = $this->status; foreach ($tags as $tag) { + if(mb_strlen($tag) > 124) { + continue; + } DB::transaction(function () use ($status, $tag) { $slug = str_slug($tag, '-', false); $hashtag = Hashtag::firstOrCreate( diff --git a/app/Util/Lexer/Extractor.php b/app/Util/Lexer/Extractor.php index 9e194b068..bcdbba919 100755 --- a/app/Util/Lexer/Extractor.php +++ b/app/Util/Lexer/Extractor.php @@ -264,7 +264,9 @@ class Extractor extends Regex if (preg_match(self::$patterns['end_hashtag_match'], $outer[0])) { continue; } - + if(mb_strlen($hashtag[0]) > 124) { + continue; + } $tags[] = [ 'hashtag' => $hashtag[0], 'indices' => [$start_position, $end_position],