diff --git a/course/edit.php b/course/edit.php
index 9c22c070a24..0e2bd224c69 100644
--- a/course/edit.php
+++ b/course/edit.php
@@ -208,8 +208,12 @@
$form->students = get_string("defaultcoursestudents");
}
}
+ } else {
+ $form = stripslashes_safe($form);
}
+ // !! no db access using data from $form beyond this point !!
+
$form->categories = get_records_select_menu("course_categories", "", "name", "id,name");
$courseformats = get_list_of_plugins("course/format");
diff --git a/course/editsection.html b/course/editsection.html
index ecc813b7789..913d0b07af8 100644
--- a/course/editsection.html
+++ b/course/editsection.html
@@ -22,7 +22,7 @@
-
+
" />
diff --git a/course/editsection.php b/course/editsection.php
index 4afb0429452..2e7437b0637 100644
--- a/course/editsection.php
+++ b/course/editsection.php
@@ -41,9 +41,11 @@
if (empty($form)) {
$form = $section;
+ } else {
+ $form = stripslashes_safe($form);
}
- $form->sesskey = !empty($USER->id) ? $USER->sesskey : '';
+ // !! no db access using data from $form beyond this point !!
$usehtmleditor = can_use_html_editor();
diff --git a/course/group-edit.html b/course/group-edit.html
index 57969bbea03..8802ffd3b90 100644
--- a/course/group-edit.html
+++ b/course/group-edit.html
@@ -57,5 +57,5 @@
-
+
diff --git a/course/group.php b/course/group.php
index 2c043b207b5..0d38ca0ae15 100644
--- a/course/group.php
+++ b/course/group.php
@@ -75,8 +75,6 @@
$usehtmleditor = false;
- $sesskey = !empty($USER->id) ? $USER->sesskey : '';
-
include('group-edit.html');
echo "