From 1f45c8571f7e59f0b01dc7ced421e08b162ce01d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 16 Mar 2013 18:50:13 +0400 Subject: [PATCH] fix escaping of entry content being broken by cache_images() rewriting --- include/rssfuncs.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 156be0b1..5c49008c 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -569,7 +569,6 @@ $entry_tags = $article["tags"]; $entry_guid = db_escape_string($entry_guid); - $entry_content = db_escape_string($article["content"], false); $entry_title = db_escape_string($article["title"]); $entry_author = db_escape_string($article["author"]); $entry_link = db_escape_string($article["link"]); @@ -582,6 +581,8 @@ if ($cache_images && is_writable(CACHE_DIR . '/images')) $entry_content = cache_images($entry_content, $site_url, $debug_enabled); + $entry_content = db_escape_string($article["content"], false); + $content_hash = "SHA1:" . sha1($entry_content); db_query($link, "BEGIN"); -- 2.39.5