]> git.mxchange.org Git - friendica.git/commitdiff
Don't process empty hash tags in Model\Item
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 13 Dec 2019 12:16:43 +0000 (07:16 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 13 Dec 2019 12:16:43 +0000 (07:16 -0500)
- Addresses https://github.com/friendica/friendica/issues/7677#issuecomment-565372628

src/Model/Item.php

index 5427ff44b3e5bf046927ba23bb3a9178ee4dfbfd..ebee91ffc2ee1b8d7300de4769252e61b20247cf 100644 (file)
@@ -2621,7 +2621,7 @@ class Item extends BaseObject
                                "&num;$2", $item["body"]);
 
                foreach ($tags as $tag) {
-                       if ((strpos($tag, '#') !== 0) || strpos($tag, '[url=') || $tag[1] == '#') {
+                       if ((strpos($tag, '#') !== 0) || strpos($tag, '[url=') || strlen($tag) < 2 || $tag[1] == '#') {
                                continue;
                        }