entry_author: do not double escape string, author & comments: trim

This commit is contained in:
Andrew Dolgov 2013-04-18 16:25:02 +04:00
parent 6d9426feae
commit ce2b219c64
1 changed files with 2 additions and 4 deletions

View File

@ -583,14 +583,12 @@
$entry_author_item = $item->get_author(); $entry_author_item = $item->get_author();
$entry_author = $entry_author_item->get_name(); $entry_author = $entry_author_item->get_name();
if (!$entry_author) $entry_author = $entry_author_item->get_email(); 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_guid = db_escape_string(mb_substr($entry_guid, 0, 245));
$entry_comments = db_escape_string(mb_substr($entry_comments, 0, 245)); $entry_comments = db_escape_string(mb_substr(trim($entry_comments), 0, 245));
$entry_author = db_escape_string(mb_substr($entry_author, 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'); $num_comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments');