]> git.wh0rd.org Git - tt-rss.git/commitdiff
Sanitize language obtained for an entry.
authorTobias Kappé <tobias.kappe@gmail.com>
Sun, 12 Aug 2018 15:12:34 +0000 (16:12 +0100)
committerTobias Kappé <tobias.kappe@gmail.com>
Sun, 12 Aug 2018 15:12:34 +0000 (16:12 +0100)
classes/rssutils.php

index 6fa1e9f4fa453bb3298d4ae9dd629ac388f6590d..af5fd057ce33278a0d1988a88a5dd0f9a116f93e 100755 (executable)
@@ -637,7 +637,7 @@ class RSSUtils {
 
                                $entry_link = rewrite_relative_url($site_url, $item->get_link());
 
-                               $entry_language = $item->get_language();
+                               $entry_language = mb_substr(trim($item->get_language()), 0, 2);
 
                                _debug("title $entry_title", $debug_enabled);
                                _debug("link $entry_link", $debug_enabled);