mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-75946 core_h5p: Fixed deprecated FILTER_SANITIZE_STRING
This commit is contained in:
parent
67bbf6c416
commit
226bfb0348
@ -15,7 +15,7 @@ class H5peditorFile {
|
||||
* Constructor. Process data for file uploaded through the editor.
|
||||
*/
|
||||
function __construct($interface) {
|
||||
$field = filter_input(INPUT_POST, 'field', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
|
||||
$field = filter_input(INPUT_POST, 'field', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES);
|
||||
|
||||
// Check for file upload.
|
||||
if ($field === NULL || empty($_FILES) || !isset($_FILES['file'])) {
|
||||
|
@ -31,3 +31,5 @@ Changed:
|
||||
* Add "use stdClass;" in h5peditor.class.php and h5peditor-file.class.php (check that it's still used before replacing it when
|
||||
upgrading the library).
|
||||
* Edit language/en.js and remove the content for 'filters' (it's a JSON with several fields, such as level or language).
|
||||
* If https://github.com/h5p/h5p-editor-php-library/pull/148 hasn't been merged, a patch needs to be added in
|
||||
h5p/h5plib/v124/joubel/editor/h5peditor-file.class.php, to replace FILTER_SANITIZE_STRING to FILTER_SANITIZE_FULL_SPECIAL_CHARS.
|
||||
|
Loading…
x
Reference in New Issue
Block a user