mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
quick fix for the problems with p() and s() - SC#167; merged from MOODLE_15_STABLE
This commit is contained in:
parent
9f07894223
commit
67afdb1121
@ -101,7 +101,7 @@ function s($var) {
|
||||
if ($var == '0') { // for integer 0, boolean false, string '0'
|
||||
return '0';
|
||||
}
|
||||
return preg_replace("/&(\w+|#\d+);/i", "&$1;", htmlspecialchars(stripslashes_safe($var)));
|
||||
return preg_replace("/&(#\d+);/i", "&$1;", htmlspecialchars(stripslashes_safe($var)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3008,7 +3008,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
|
||||
}
|
||||
|
||||
echo '<textarea id="edit-'. $name .'" name="'. $name .'" rows="'. $rows .'" cols="'. $cols .'">';
|
||||
p($value);
|
||||
if ($usehtmleditor) {
|
||||
echo htmlspecialchars(stripslashes_safe($value)); // needed for editing of cleaned text!
|
||||
} else {
|
||||
p ($value);
|
||||
}
|
||||
echo '</textarea>'."\n";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user