From cfb3b633f50decbe0ebd04ba46eaea5f4e5fa226 Mon Sep 17 00:00:00 2001
From: Brice Maron <brice@bmaron.net>
Date: Mon, 18 Jun 2012 19:51:46 +0000
Subject: [PATCH] Force sanitize function to use UTF8 (for php lower than 5.4)

---
 lib/template.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/template.php b/lib/template.php
index a5d10c45d2..77e9332d5b 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -326,7 +326,7 @@ class OC_Template{
 	 * This function is internally used to sanitize HTML.
 	 */
  	private static function sanitizeHTML( &$value ){
- 			$value = htmlentities( $value );
+ 			$value = htmlentities( $value , ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
  			return $value;
     }
 
-- 
GitLab