* Follow-up to bugfix #12436: Move Suhosin part to php.ini section in the install tool
* Fixed bug #9981: EM does not test for usage of mod.php-API and spuriously displays an error (thanks to Andreas Kundoch)
+ * Follow-up to bugfix #12581: Use FILTER_FLAG_SCHEME_REQUIRED constant in t3lib_div::isValidUrl()
2009-11-24 Stanislas Rolland <typo3@sjbr.ca>
* @return boolean Whether the given URL is valid
*/
public static function isValidUrl($url) {
- return (filter_var($url, FILTER_VALIDATE_URL) !== false);
+ return (filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false);
}
);
// Pass if URL is on the current host:
- if (self::isValidUrl($decodedUrl) && preg_match('#^[a-z0-9]+://#', $decodedUrl)) {
+ if (self::isValidUrl($decodedUrl)) {
if (self::isOnCurrentHost($decodedUrl) && strpos($decodedUrl, self::getIndpEnv('TYPO3_SITE_URL')) === 0) {
$sanitizedUrl = $url;
}