From fc22da99e2c3e8129fd6474f57ab33567dabf3bd Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 12 Feb 2008 11:57:39 +0000 Subject: [PATCH] Added check for fields that contain markup (an error!) Merged from STABLE_19 --- question/format/xml/format.php | 3 +++ 1 file changed, 3 insertions(+) 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 ) ); } -- 2.39.5