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:
moodler
2002-10-18 06:05:56 +00:00
parent e757af1662
commit 08beb3327b
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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: