diff --git a/course/format/topics.php b/course/format/topics.php
index 7b56ccb661b..31a6cc67811 100644
--- a/course/format/topics.php
+++ b/course/format/topics.php
@@ -100,7 +100,7 @@
/// If currently moving a file then show the current clipboard
if (ismoving($course->id)) {
- $stractivityclipboard = get_string("activityclipboard", "", addslashes($USER->activitycopyname));
+ $stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname)));
$strcancel= get_string("cancel");
echo "
";
echo "| cellcontent\" class=\"topicoutlineclip\" width=\"100%\">";
diff --git a/course/format/weeks.php b/course/format/weeks.php
index b6cd11a91fa..cb8442d8a00 100644
--- a/course/format/weeks.php
+++ b/course/format/weeks.php
@@ -88,7 +88,7 @@
/// If currently moving a file then show the current clipboard
if (ismoving($course->id)) {
- $stractivityclipboard = get_string("activityclipboard", "", addslashes($USER->activitycopyname));
+ $stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname)));
$strcancel= get_string("cancel");
echo " |
";
echo "| cellcontent\" class=\"weeklyoutlineclip\" width=\"100%\">";
|