summaryrefslogtreecommitdiff
path: root/plugins/note/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/note/init.php')
-rw-r--r--plugins/note/init.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/note/init.php b/plugins/note/init.php
index 278cfe6c3..f4bdf45bc 100644
--- a/plugins/note/init.php
+++ b/plugins/note/init.php
@@ -55,17 +55,14 @@ class Note extends Plugin {
}
function setNote() {
- $id = $_REQUEST["id"];
- $note = trim(strip_tags($_REQUEST["note"]));
+ $id = (int)clean($_REQUEST["id"]);
+ $note = clean($_REQUEST["note"]);
$sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET note = ?
WHERE ref_id = ? AND owner_uid = ?");
$sth->execute([$note, $id, $_SESSION['uid']]);
- $formatted_note = Article::_format_note_html($id, $note);
-
- print json_encode(array("note" => $formatted_note,
- "raw_length" => mb_strlen($note)));
+ print json_encode(["id" => $id, "note" => $note]);
}
function api_version() {