diff options
author | Tom Needham <needham.thomas@gmail.com> | 2011-09-28 20:23:00 +0100 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2011-09-28 20:23:00 +0100 |
commit | 2ca74dc334de525fdf5dc984de3702d65ce79d4a (patch) | |
tree | fe21a679b114271cf61922b051d4ee33e2ffad34 | |
parent | 3129855cc43cf94292623b74b625914578d23316 (diff) | |
download | nextcloud-server-2ca74dc334de525fdf5dc984de3702d65ce79d4a.tar.gz nextcloud-server-2ca74dc334de525fdf5dc984de3702d65ce79d4a.zip |
Ficed text encoding bug. Removed unnecessary file retrival call
-rw-r--r-- | apps/editor/index.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/editor/index.php b/apps/editor/index.php index 209bca75ddb..701104f0a81 100644 --- a/apps/editor/index.php +++ b/apps/editor/index.php @@ -27,7 +27,7 @@ require_once('../../lib/base.php'); // Check if we are a user OC_Util::checkLoggedIn(); -$filecontents = urlencode(OC_Filesystem::file_get_contents($_GET['dir'].'/'.$_GET['file'] )); +$filecontents = htmlspecialchars(OC_Filesystem::file_get_contents($_GET['dir'].'/'.$_GET['file'] )); $filehash = md5($filecontents); $file = $_GET['file']; $dir = $_GET['dir']; @@ -69,7 +69,7 @@ $_SESSION[$sessionname] = $filehash; // Process the template $tmpl = new OC_Template( 'editor', 'index', 'user' ); $tmpl->assign('filetype',$filetype); -$tmpl->assign('filecontents', urlencode(OC_Filesystem::file_get_contents($path)) ); +$tmpl->assign('filecontents', $filecontents); $tmpl->assign('file',$file); $tmpl->assign('dir',$dir); $tmpl->printPage(); |