Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p() and print_unescaped() also take arrays as parameter #8188

Merged
merged 1 commit into from
Apr 13, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/private/template/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
*/

/**
* Prints an XSS escaped string
* @param string $string the string which will be escaped and printed
* Prints a sanitized string
* @param string|array $string the string which will be escaped and printed
*/
function p($string) {
print(OC_Util::sanitizeHTML($string));
}

/**
* Prints an unescaped string
* @param string $string the string which will be printed as it is
* Prints an unsanitized string - usage of this function may result into XSS.
* Consider using p() instead.
* @param string|array $string the string which will be printed as it is
*/
function print_unescaped($string) {
print($string);
Expand Down