summaryrefslogtreecommitdiff
path: root/opml.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-10-13 02:05:47 +0100
committerAndrew Dolgov <[email protected]>2005-10-13 02:05:47 +0100
commit8b7395bb64506180f9b7a76b00948cd4f3cb9de3 (patch)
tree4b4d130b133fdb2b7f487f3c6534bfcdab6f0075 /opml.php
parent1696229f9df3a65e06246ea9e5b1ee1424f4c02a (diff)
escape data on OPML import (take 2)
Diffstat (limited to 'opml.php')
-rw-r--r--opml.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/opml.php b/opml.php
index e8c9c9b79..bcfa31700 100644
--- a/opml.php
+++ b/opml.php
@@ -46,12 +46,19 @@
}
}
+ /* this is suboptimal */
+
+ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+
+ if (!$link) return;
+
+ $title = db_escape_string_2($title, $link);
+ $url = db_escape_string_2($url, $link);
+
if (!$title || !$url) return;
print "Feed <b>$title</b> ($url)... ";
- $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
-
$result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
title = '$title' OR feed_url = '$url'");