From 962b7a7c80e5581381ac25dd79ae40c09fc4667b Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sun, 3 Mar 2013 23:46:08 +0100 Subject: [PATCH] Add log as text and not as HTML --- settings/ajax/getlog.php | 11 ++--------- settings/js/log.js | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index e1fc168987..141457e72a 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -12,14 +12,7 @@ $offset=(isset($_GET['offset']))?$_GET['offset']:0; $entries=OC_Log_Owncloud::getEntries($count, $offset); $data = array(); -foreach($entries as $entry) { - $data[] = array( - 'level' => OC_Util::sanitizeHTML($entry->level), - 'app' => OC_Util::sanitizeHTML($entry->app), - 'message' => OC_Util::sanitizeHTML($entry->message), - 'time' => OC_Util::sanitizeHTML($entry->time), - ); -} + OC_JSON::success(array( - "data" => $data, + "data" => $entries, "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $offset)) != 0) ? true : false)); diff --git a/settings/js/log.js b/settings/js/log.js index 04a7bf8b28..09b8ec1ab4 100644 --- a/settings/js/log.js +++ b/settings/js/log.js @@ -42,7 +42,7 @@ OC.Log={ row.append(appTd); var messageTd=$(''); - messageTd.html(entry.message); + messageTd.text(entry.message); row.append(messageTd); var timeTd=$('');