From 91fa457ea2cdf843747a1d99ce5593648c95bf05 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 12 Feb 2008 11:55:33 +0000 Subject: [PATCH] Added check for fields that contain markup (an error!) --- 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 e8e4edbe8..36d70334c 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.11.4.GIT