From b9647509d43a598cb6373bc0ebce5decb293fefc Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 15 Jun 2012 10:12:53 +0200 Subject: [PATCH] MDL-32279 filters: filters: setup() before filter() is better. --- lib/weblib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 644d48b6159..84362feaa04 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1303,8 +1303,8 @@ function format_string($string, $striplinks = true, $options = NULL) { if (!empty($CFG->filterall)) { $filtermanager = filter_manager::instance(); - $string = $filtermanager->filter_string($string, $options['context']); $filtermanager->setup_page_for_filters($PAGE, $options['context']); // Setup global stuff filters may have. + $string = $filtermanager->filter_string($string, $options['context']); } // If the site requires it, strip ALL tags from this string