Allow <IMG> tags in Moodle format text. Not having it can really mess
up smileys etc if the text has been edited at any stage using the richtext editor. I realise it's possible for students to really mess up forums display etc if they wanted to include a huge picture ... I'm not sure if there are any cross-site scripting attacks possible with images in there. But there is also now the HTML format for most things, which is editable using an ordinary form, so this problem is currently already exposed. I think it's OK as long as can find a filter to strip all javascript out of ANY format text in Moodle.
This commit is contained in:
@@ -115,6 +115,7 @@ $LANGUAGES = array (
|
||||
"pl" => "Polish",
|
||||
"ps" => "Pushto",
|
||||
"pt" => "Portuguese",
|
||||
"pt_br" => "Portuguese (Brazil)",
|
||||
"qu" => "Quechua",
|
||||
"rm" => "Raeto-Romance",
|
||||
"rn" => "Rundi",
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ function print_navigation ($navigation) {
|
||||
}
|
||||
|
||||
function print_heading($text, $align="CENTER", $size=3) {
|
||||
echo "<P ALIGN=\"$align\"><FONT SIZE=\"$size\"><B>$text</B></FONT></P>";
|
||||
echo "<P ALIGN=\"$align\"><FONT SIZE=\"$size\"><B>".stripslashes($text)."</B></FONT></P>";
|
||||
}
|
||||
|
||||
function print_continue($link) {
|
||||
|
||||
+1
-1
@@ -351,7 +351,7 @@ function clean_text($text, $format) {
|
||||
|
||||
switch ($format) {
|
||||
case FORMAT_MOODLE:
|
||||
return strip_tags($text, '<b><i><u><font><ol><ul><dl><li><dt><dd><h1><h2><h3><hr>');
|
||||
return strip_tags($text, '<b><i><u><font><ol><ul><dl><li><dt><dd><h1><h2><h3><hr><img>');
|
||||
break;
|
||||
|
||||
case FORMAT_HTML:
|
||||
|
||||
Reference in New Issue
Block a user