]> git.mxchange.org Git - friendica.git/commitdiff
ignore hex escapes as numeric tags
authorfriendica <info@friendica.com>
Wed, 26 Jun 2013 11:58:54 +0000 (04:58 -0700)
committerfriendica <info@friendica.com>
Wed, 26 Jun 2013 11:58:54 +0000 (04:58 -0700)
include/tags.php

index bf44a144ce612c393dc3c027c16f5b6f0c27a480..a06504fbe3631929f2b896c3302e6ccf78859620 100644 (file)
@@ -79,7 +79,11 @@ function create_tags_from_item($itemid) {
        foreach ($tags as $tag=>$link) {
 
                if (substr(trim($tag), 0, 1) == "#") {
-                       if(ctype_digit(substr($tag,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);