diff --git a/mod/quiz/format/xml/format.php b/mod/quiz/format/xml/format.php index 012b2dc4571..ec57e6f942c 100755 --- a/mod/quiz/format/xml/format.php +++ b/mod/quiz/format/xml/format.php @@ -134,9 +134,8 @@ function get_qtype( $type_id ) { function writetext( $raw ) { // generates tags, processing raw text therein - // for now, don't allow any additional tags in text - // otherwise xml rules would probably get broken - $raw = strip_tags( $raw ); + // encode the text to 'disguise' HTML content + $raw = htmlspecialchars( $raw ); return "$raw\n"; }