From c19c05c4003b3307ef1fdeff43ecb3a376efedea Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Tue, 21 Feb 2006 07:17:02 +0000 Subject: [PATCH] security issues with dangerous template --- mod/data/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/data/lib.php b/mod/data/lib.php index ffbb3a90cb5..8085ef1ce0a 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -799,9 +799,9 @@ function data_print_template($records, $data, $search, $template, $sort, $page=0 ///actual replacement of the tags $newtext = preg_replace($patterns, $replacement, $data->{$template}); if ($return) { - return $newtext; + return format_text($newtext); } else { - echo $newtext; //prints the template with tags replaced + echo format_text($newtext); //prints the template with tags replaced } /********************************** @@ -1095,7 +1095,7 @@ function data_print_comment($data, $commentid) { print_user_picture($comment->userid, $course->id, false); echo ''; - echo '
'; + echo '
'; $fullname = fullname($user, isteacher($comment->userid)); $by = ''.$fullname.'';