diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-12-08 08:28:15 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-12-08 08:56:47 +0100 |
commit | 4b293dffe56ac452ed3bdadb3dd094e667ecfb2d (patch) | |
tree | 98aca3c33393a4edd417d1c61484673c9a587660 /lib | |
parent | 70c228a7cc31c6193bdd1c2f18a75dffe08785b8 (diff) | |
download | nextcloud-server-4b293dffe56ac452ed3bdadb3dd094e667ecfb2d.tar.gz nextcloud-server-4b293dffe56ac452ed3bdadb3dd094e667ecfb2d.zip |
Use \OCP\Util::sanitizeHTML instead of \OC_Util::sanitizeHTML
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/template.php | 6 | ||||
-rw-r--r-- | lib/private/template/functions.php | 4 | ||||
-rw-r--r-- | lib/public/util.php | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/template.php b/lib/private/template.php index 1476a964ef3..d794dacac23 100644 --- a/lib/private/template.php +++ b/lib/private/template.php @@ -226,12 +226,12 @@ class OC_Template extends \OC\Template\Base { // Add custom headers $headers = ''; foreach(OC_Util::$headers as $header) { - $headers .= '<'.OC_Util::sanitizeHTML($header['tag']); + $headers .= '<'.\OCP\Util::sanitizeHTML($header['tag']); foreach($header['attributes'] as $name=>$value) { - $headers .= ' '.OC_Util::sanitizeHTML($name).'="'.OC_Util::sanitizeHTML($value).'"'; + $headers .= ' '.\OCP\Util::sanitizeHTML($name).'="'.\OCP\Util::sanitizeHTML($value).'"'; } if ($header['text'] !== null) { - $headers .= '>'.OC_Util::sanitizeHTML($header['text']).'</'.OC_Util::sanitizeHTML($header['tag']).'>'; + $headers .= '>'.\OCP\Util::sanitizeHTML($header['text']).'</'.\OCP\Util::sanitizeHTML($header['tag']).'>'; } else { $headers .= '/>'; } diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index 79d18632d2f..d156d26f9ce 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -33,7 +33,7 @@ * @param string $string the string which will be escaped and printed */ function p($string) { - print(OC_Util::sanitizeHTML($string)); + print(\OCP\Util::sanitizeHTML($string)); } /** @@ -262,7 +262,7 @@ function html_select_options($options, $selected, $params=array()) { $label = $label[$label_name]; } $select = in_array($value, $selected) ? ' selected="selected"' : ''; - $html .= '<option value="' . OC_Util::sanitizeHTML($value) . '"' . $select . '>' . OC_Util::sanitizeHTML($label) . '</option>'."\n"; + $html .= '<option value="' . \OCP\Util::sanitizeHTML($value) . '"' . $select . '>' . \OCP\Util::sanitizeHTML($label) . '</option>'."\n"; } return $html; } diff --git a/lib/public/util.php b/lib/public/util.php index 110028368d0..4e783b764ed 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -497,11 +497,11 @@ class Util { * string or array of strings before displaying it on a web page. * * @param string|array $value - * @return string|array an array of sanitized strings or a single sinitized string, depends on the input parameter. + * @return string|array an array of sanitized strings or a single sanitized string, depends on the input parameter. * @since 4.5.0 */ - public static function sanitizeHTML( $value ) { - return(\OC_Util::sanitizeHTML($value)); + public static function sanitizeHTML($value) { + return \OC_Util::sanitizeHTML($value); } /** |