summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-18 16:25:02 +0400
committerAndrew Dolgov <[email protected]>2013-04-18 16:25:02 +0400
commitce2b219c64df3a84bacea2aecf05cc2e96aa0d59 (patch)
treec843046469110607579784795a7c0a103c1f70ef
parent6d9426feae3d80272722de2fda6ee9e0056569ca (diff)
entry_author: do not double escape string, author & comments: trim
-rw-r--r--include/rssfuncs.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 9c80a72d6..079471b4d 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -583,14 +583,12 @@
$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');