]> git.wh0rd.org Git - tt-rss.git/commitdiff
api, add sanitize to getHeadlines (defaults to true)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 15 May 2013 14:07:35 +0000 (18:07 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 15 May 2013 14:07:35 +0000 (18:07 +0400)
classes/api.php

index f5e4a0c5cb76853bd62e44b8b79d41c9dded21cd..98721e45d2b56c0e1008f90a710a6f9055287ffd 100644 (file)
@@ -2,7 +2,7 @@
 
 class API extends Handler {
 
-       const API_LEVEL  = 6;
+       const API_LEVEL  = 7;
 
        const STATUS_OK  = 0;
        const STATUS_ERR = 1;
@@ -197,7 +197,8 @@ class API extends Handler {
                        $include_attachments = sql_bool_to_bool($_REQUEST["include_attachments"]);
                        $since_id = (int)$this->dbh->escape_string($_REQUEST["since_id"]);
                        $include_nested = sql_bool_to_bool($_REQUEST["include_nested"]);
-                       $sanitize_content = true;
+                       $sanitize_content = !isset($_REQUEST["sanitize"]) ||
+                               sql_bool_to_bool($_REQUEST["sanitize"]);
 
                        $override_order = false;
                        switch ($_REQUEST["order_by"]) {