mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Updated DOM element matching to allow for "//" urls in images
This commit is contained in:
@@ -44,11 +44,13 @@ defined('MOODLE_INTERNAL') || die();
|
||||
class maintenance_static_page_io {
|
||||
/**
|
||||
* Checks if the given string starts with "http://" or "https://".
|
||||
* Also checks for "//" at the start of image, which setting_file_url still uses.
|
||||
*
|
||||
* @param $url
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_url($url) {
|
||||
return (bool)preg_match('#^http(s)?://#', $url);
|
||||
return ((bool) preg_match('#^http(s)?://#', $url) || (bool) preg_match('#^//#', $url));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user