Hashtag handling with Diaspora improved

This commit is contained in:
Michael 2020-04-19 16:33:06 +00:00
parent 98b3058601
commit 538e212a84
4 changed files with 41 additions and 4 deletions

View file

@ -2610,7 +2610,10 @@ class Item
// This sorting is important when there are hashtags that are part of other hashtags
// Otherwise there could be problems with hashtags like #test and #test2
rsort($tags);
// Because of this we are sorting from the longest to the shortest tag.
usort($rawtags, function($a, $b) {
return strlen($b) <=> strlen($a);
});
$URLSearchString = "^\[\]";