aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-11 19:42:15 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-11 19:42:15 +0200
commit77ecfdd1a42811a1239b29c18b21768d2a5a3ae0 (patch)
tree02a939f5795e226e3833802aff2852f157379681 /lib
parente704bc2bf01e8db49634bd1ec9b9dbd11afc246d (diff)
downloadnextcloud-server-77ecfdd1a42811a1239b29c18b21768d2a5a3ae0.tar.gz
nextcloud-server-77ecfdd1a42811a1239b29c18b21768d2a5a3ae0.zip
Only encode dangerous dangerous characters
There is no need to encode all characters into HTML entities, only potential dangerous characters as &, ", ', < and > should get encoded. This may fix issues like https://github.com/owncloud/calendar/pull/394
Diffstat (limited to 'lib')
-rwxr-xr-xlib/private/util.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 731b7c97503..a744644b39c 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -805,7 +805,7 @@ class OC_Util {
array_walk_recursive($value, 'OC_Util::sanitizeHTML');
} else {
//Specify encoding for PHP<5.4
- $value = htmlentities((string)$value, ENT_QUOTES, 'UTF-8');
+ $value = htmlspecialchars((string)$value, ENT_QUOTES, 'UTF-8');
}
return $value;
}