]> git.mjollnir.org Git - moodle.git/commitdiff
Do not allow HTML in wiki text pages. (It causes problems)
authorthepurpleblob <thepurpleblob>
Tue, 26 Aug 2003 11:59:32 +0000 (11:59 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 26 Aug 2003 11:59:32 +0000 (11:59 +0000)
lib/wiki.php

index 076034a83f6c343d851ed957f910c991e07eeb22..c628388038aec397480a9bba342efb935543ec34 100644 (file)
@@ -193,6 +193,10 @@ class Wiki {
     if (IN_MOODLE==1) {\r
       global $CFG;\r
     }\r
+\r
+    // convert < and > (kills HTML)\r
+    $line = str_replace( ">", "&gt;", $line );\r
+    $line = str_replace( "<", "&lt;", $line );\r
     \r
     // ---- (at least) means a <HR>\r
     $line = eregi_replace( "^-{4}.*", "<div class=\"hr\"><hr /></div>", $line );\r