From: thepurpleblob Date: Tue, 12 Feb 2008 11:57:39 +0000 (+0000) Subject: Added check for fields that contain markup (an error!) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fc22da99e2c3e8129fd6474f57ab33567dabf3bd;p=moodle.git Added check for fields that contain markup (an error!) Merged from STABLE_19 --- diff --git a/question/format/xml/format.php b/question/format/xml/format.php index e8e4edbe8c..36d70334ce 100755 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -105,6 +105,9 @@ class qformat_xml extends qformat_default { else $xml = $xml[$index]; } if ($istext) { + if (!is_string($xml)) { + $this->error( 'Invalid xml file - string expected (use CDATA?)' ); + } $xml = addslashes( trim( $xml ) ); }