fix double escaping of entry data on insert/update sequence
This commit is contained in:
parent
262bd8ea53
commit
b17fcb1a0c
|
@ -274,6 +274,11 @@
|
||||||
|
|
||||||
$owner_uid = $_SESSION["uid"];
|
$owner_uid = $_SESSION["uid"];
|
||||||
|
|
||||||
|
$entry_content = db_escape_string($entry_content);
|
||||||
|
$entry_title = db_escape_string($entry_title);
|
||||||
|
$entry_link = db_escape_string($entry_link);
|
||||||
|
$entry_comments = db_escape_string($entry_comments);
|
||||||
|
|
||||||
if (db_num_rows($result) == 0) {
|
if (db_num_rows($result) == 0) {
|
||||||
|
|
||||||
// base post entry does not exist, create it
|
// base post entry does not exist, create it
|
||||||
|
@ -284,11 +289,6 @@
|
||||||
}
|
}
|
||||||
error_reporting (E_ERROR | E_WARNING | E_PARSE);
|
error_reporting (E_ERROR | E_WARNING | E_PARSE);
|
||||||
|
|
||||||
$entry_content = db_escape_string($entry_content);
|
|
||||||
$entry_title = db_escape_string($entry_title);
|
|
||||||
$entry_link = db_escape_string($entry_link);
|
|
||||||
$entry_comments = db_escape_string($entry_comments);
|
|
||||||
|
|
||||||
$result = db_query($link,
|
$result = db_query($link,
|
||||||
"INSERT INTO ttrss_entries
|
"INSERT INTO ttrss_entries
|
||||||
(title,
|
(title,
|
||||||
|
@ -376,9 +376,6 @@
|
||||||
|
|
||||||
// print "<!-- post $orig_title needs update : $post_needs_update -->";
|
// print "<!-- post $orig_title needs update : $post_needs_update -->";
|
||||||
|
|
||||||
$entry_content = db_escape_string($entry_content);
|
|
||||||
$entry_title = db_escape_string($entry_title);
|
|
||||||
|
|
||||||
db_query($link, "UPDATE ttrss_entries
|
db_query($link, "UPDATE ttrss_entries
|
||||||
SET title = '$entry_title', content = '$entry_content'
|
SET title = '$entry_title', content = '$entry_content'
|
||||||
WHERE id = '$ref_id'");
|
WHERE id = '$ref_id'");
|
||||||
|
|
Loading…
Reference in New Issue