From 885b6007c79ec6117b7fd2e3d545c95e63003795 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 6 Apr 2005 15:20:33 +0000 Subject: [PATCH] Now label->name is working with filterall. (not really important because it is never shown, but...) --- mod/label/lib.php | 5 ++--- mod/label/restorelib.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mod/label/lib.php b/mod/label/lib.php index 2321fa8f786..fb4695bf3d3 100644 --- a/mod/label/lib.php +++ b/mod/label/lib.php @@ -11,7 +11,7 @@ function label_add_instance($label) { /// will create a new instance and return the id number /// of the new instance. - $label->name = strip_tags($label->content); + $label->name = strip_tags(format_string(stripslashes($label->content),true)); if (strlen($label->name) > LABEL_MAX_NAME_LENGTH) { $label->name = substr($label->name, 0, LABEL_MAX_NAME_LENGTH)."..."; } @@ -25,8 +25,7 @@ function label_update_instance($label) { /// Given an object containing all the necessary data, /// (defined by the form in mod.html) this function /// will update an existing instance with new data. - - $label->name = strip_tags($label->content); + $label->name = strip_tags(format_string(stripslashes($label->content),true)); if (strlen($label->name) > LABEL_MAX_NAME_LENGTH) { $label->name = substr($label->name, 0, LABEL_MAX_NAME_LENGTH)."..."; } diff --git a/mod/label/restorelib.php b/mod/label/restorelib.php index 450efdf04db..a6888d7f919 100644 --- a/mod/label/restorelib.php +++ b/mod/label/restorelib.php @@ -43,7 +43,7 @@ $newid = insert_record ("label",$label); //Do some output - echo "
  • ".get_string("modulename","label")." \"".$label->name."\"
  • "; + echo "
  • ".get_string("modulename","label")." \"".format_string(stripslashes($label->name),true)."\"
  • "; backup_flush(300); if ($newid) {