MDL-23184 PARAM_CLEANHTML is work with real html markup only, it does not do our custom FORMAT_MOODLE tweaks anymore, luckily this was not supposed to be used before storage to database in 1.9, that means there should not be any BC issues;improved docs

This commit is contained in:
Petr Skoda 2010-09-02 18:49:31 +00:00
parent f4091f8e37
commit 86f6eec327

View file

@ -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: