mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-05 17:01:32 +00:00
escape data on OPML import (take 2)
This commit is contained in:
11
opml.php
11
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'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user