]> git.mjollnir.org Git - moodle.git/commitdiff
Added check for <text> fields that contain markup (an error!)
authorthepurpleblob <thepurpleblob>
Tue, 12 Feb 2008 11:57:39 +0000 (11:57 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 12 Feb 2008 11:57:39 +0000 (11:57 +0000)
Merged from STABLE_19

question/format/xml/format.php

index e8e4edbe8cf825f39a978cdc99f7130e32d9134c..36d70334cedd2df7037ee3a10b235c06f3e34e9f 100755 (executable)
@@ -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 ) );
         }