]> git.wh0rd.org - tt-rss.git/commitdiff
entry_author: do not double escape string, author & comments: trim
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 18 Apr 2013 12:25:02 +0000 (16:25 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 18 Apr 2013 12:25:02 +0000 (16:25 +0400)
include/rssfuncs.php

index 9c80a72d6efc7035ac9151fc27afd8cccb516b9f..079471b4daf7f68b244886d00819396883f4b55c 100644 (file)
                                        $entry_author_item = $item->get_author();
                                        $entry_author = $entry_author_item->get_name();
                                        if (!$entry_author) $entry_author = $entry_author_item->get_email();
-
-                                       $entry_author = db_escape_string($entry_author);
                                }
 
                                $entry_guid = db_escape_string(mb_substr($entry_guid, 0, 245));
 
-                               $entry_comments = db_escape_string(mb_substr($entry_comments, 0, 245));
-                               $entry_author = db_escape_string(mb_substr($entry_author, 0, 245));
+                               $entry_comments = db_escape_string(mb_substr(trim($entry_comments), 0, 245));
+                               $entry_author = db_escape_string(mb_substr(trim($entry_author), 0, 245));
 
                                $num_comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments');