From 86f6eec3276204491f4336fb5526544e7f0fd11d Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 2 Sep 2010 18:49:31 +0000 Subject: [PATCH] =?UTF-8?q?MDL-23184=20PARAM=5FCLEANHTML=20is=20work=20wit?= =?UTF-8?q?h=20real=20html=20markup=20only,=20it=20does=20not=20do=20our?= =?UTF-8?q?=20custom=20FORMAT=5FMOODLE=20tweaks=20anymore,=20luckily=20thi?= =?UTF-8?q?s=20was=20not=20supposed=20to=20be=20used=20before=20storage=20?= =?UTF-8?q?to=20database=20in=201.9,=20that=20means=20there=20should=20not?= =?UTF-8?q?=20be=20any=20BC=20issues;=CAimproved=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/moodlelib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index d95a15ceda8..26b5f709f31 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -117,7 +117,7 @@ define('PARAM_BOOL', 'bool'); define('PARAM_CAPABILITY', 'capability'); /** - * PARAM_CLEANHTML - cleans submitted HTML code. use only for text in HTML format. It stays as HTML. + * PARAM_CLEANHTML - cleans submitted HTML code. use only for text in HTML format. This cleaning may fix xhtml strictness too. */ define('PARAM_CLEANHTML', 'cleanhtml'); @@ -560,8 +560,8 @@ function clean_param($param, $type) { } return clean_text($param); // Sweep for scripts, etc - case PARAM_CLEANHTML: // prepare html fragment for display, do not store it into db!! - $param = clean_text($param); // Sweep for scripts, etc + case PARAM_CLEANHTML: // clean html fragment + $param = clean_text($param, FORMAT_HTML); // Sweep for scripts, etc return trim($param); case PARAM_INT: