mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
A fix for kses problems with quotes ...
This commit is contained in:
parent
fd1eb1608a
commit
0549198cf0
@ -194,6 +194,9 @@ function clean_param($param, $options) {
|
||||
|
||||
if ($options & PARAM_CLEAN) {
|
||||
$param = clean_text($param); // Sweep for scripts, etc
|
||||
$param = str_replace('"', '\\\\"', $param); // Because clean_text will strip them
|
||||
// when checking HTML tags ... I'm not
|
||||
// sure if this is really necessary to replace
|
||||
}
|
||||
|
||||
if ($options & PARAM_INT) {
|
||||
|
@ -1269,7 +1269,7 @@ function cleanAttributes2($htmlTag){
|
||||
global $CFG, $ALLOWED_PROTOCOLS;
|
||||
require_once($CFG->libdir .'/kses.php');
|
||||
|
||||
$htmlTag = kses_stripslashes($htmlTag);
|
||||
$htmlTag = str_replace('\\\\"', '"', $htmlTag);
|
||||
if (substr($htmlTag, 0, 1) != '<') {
|
||||
return '>'; //a single character ">" detected
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user