]> git.mxchange.org Git - friendica.git/blobdiff - include/tags.php
Better handling of the network field in the item table.
[friendica.git] / include / tags.php
index 6e73f616cb82100fe60065d584f912230fe05273..e5bc29cd4f5db6bb13662e4c1a6f35db8dde2935 100644 (file)
@@ -79,6 +79,12 @@ function create_tags_from_item($itemid) {
        foreach ($tags as $tag=>$link) {
 
                if (substr(trim($tag), 0, 1) == "#") {
+                       // try to ignore #039 or #1 or anything like that
+                       if(ctype_digit(substr(trim($tag),1)))
+                               continue;
+                       // try to ignore html hex escapes, e.g. #x2317
+                       if((substr(trim($tag),1,1) == 'x' || substr(trim($tag),1,1) == 'X') && ctype_digit(substr(trim($tag),2)))
+                               continue;
                        $type = TERM_HASHTAG;
                        $term = substr($tag, 1);
                } elseif (substr(trim($tag), 0, 1) == "@") {