From 9ae4c1fb3229c57aac2d30a3c0f91470a0442e28 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 26 Jun 2013 04:58:54 -0700 Subject: [PATCH] ignore hex escapes as numeric tags --- include/tags.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/tags.php b/include/tags.php index bf44a144ce..a06504fbe3 100644 --- a/include/tags.php +++ b/include/tags.php @@ -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);