From 8985413901db0cd1fe51521a8b3ced5a8d62468f Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Sun, 1 Nov 2015 11:58:30 -0500 Subject: [PATCH] #407 Add endpoint for canned responses --- api/canned/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/canned/index.php b/api/canned/index.php index c9c35024..996f6274 100644 --- a/api/canned/index.php +++ b/api/canned/index.php @@ -9,9 +9,10 @@ hesk_dbConnect(); // Routing if (isset($_GET['id'])) { - $response = hesk_dbQuery("SELECT `id`, `message`, `html`, `title`, `reply_order` FROM `" + $response = hesk_dbQuery("SELECT `id`, `message`, `title`, `reply_order` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "std_replies` WHERE `id` = ".intval($_GET['id'])); $result = hesk_dbFetchAssoc($response); + $result['message'] = html_entity_decode($result['message']); header('Content-Type: application/json'); print json_encode($result);