MDL-63717 tool_mobile: Ensure URLs are valid
We need to clean the URLs returned by the get_public_config WS because some old plugins didn't validate the stored data.
This commit is contained in:
@@ -194,10 +194,10 @@ class api {
|
||||
|
||||
// Check that we are receiving a moodle_url object, themes can override get_logo_url and may return incorrect values.
|
||||
if (($logourl = $OUTPUT->get_logo_url()) && $logourl instanceof moodle_url) {
|
||||
$settings['logourl'] = $logourl->out(false);
|
||||
$settings['logourl'] = clean_param($logourl->out(false), PARAM_URL);
|
||||
}
|
||||
if (($compactlogourl = $OUTPUT->get_compact_logo_url()) && $compactlogourl instanceof moodle_url) {
|
||||
$settings['compactlogourl'] = $compactlogourl->out(false);
|
||||
$settings['compactlogourl'] = clean_param($compactlogourl->out(false), PARAM_URL);
|
||||
}
|
||||
|
||||
// Identity providers.
|
||||
|
||||
Reference in New Issue
Block a user