]> source.dussan.org Git - nextcloud-server.git/commitdiff
Ficed text encoding bug. Removed unnecessary file retrival call
authorTom Needham <needham.thomas@gmail.com>
Wed, 28 Sep 2011 19:23:00 +0000 (20:23 +0100)
committerTom Needham <needham.thomas@gmail.com>
Wed, 28 Sep 2011 19:23:00 +0000 (20:23 +0100)
apps/editor/index.php

index 209bca75ddbd731dd07891d906873c1be6adfa77..701104f0a815ec2500d0337cec7f0fb97a393479 100644 (file)
@@ -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();