]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix escaping of entry content being broken by cache_images() rewriting
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 16 Mar 2013 14:50:13 +0000 (18:50 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 16 Mar 2013 14:50:13 +0000 (18:50 +0400)
include/rssfuncs.php

index 156be0b12236762a939cc78ee0c2f6d70612794a..5c49008c56db1cfbfdb33d9c5dbde49541d8566d 100644 (file)
 
                                $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"]);
                                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");