diff options
-rwxr-xr-x | classes/rssutils.php | 6 | ||||
-rwxr-xr-x | include/functions.php | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php index 2a54de0eb..d125a5032 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -675,9 +675,13 @@ class RSSUtils { $entry_tags = array_unique($additional_tags); - for ($i = 0; $i < count($entry_tags); $i++) + for ($i = 0; $i < count($entry_tags); $i++) { $entry_tags[$i] = mb_strtolower($entry_tags[$i], 'utf-8'); + // we don't support numeric tags, let's prefix them + if (is_numeric($entry_tags[$i])) $entry_tags[$i] = 't:' . $entry_tags[$i]; + } + _debug("tags found: " . join(",", $entry_tags), $debug_enabled); _debug("done collecting data.", $debug_enabled); diff --git a/include/functions.php b/include/functions.php index 8e9949f75..183552437 100755 --- a/include/functions.php +++ b/include/functions.php @@ -1762,11 +1762,8 @@ } function tag_is_valid($tag) { - if ($tag == '') return false; - if (is_numeric($tag)) return false; - if (mb_strlen($tag) > 250) return false; - - if (!$tag) return false; + if (!$tag || is_numeric($tag) || mb_strlen($tag) > 250) + return false; return true; } |