Merge branch '2.8'

This commit is contained in:
plegall
2016-11-17 14:14:16 +01:00
2 changed files with 13 additions and 3 deletions
+10
View File
@@ -2073,6 +2073,16 @@ function mobile_theme()
*/
function url_check_format($url)
{
if (strpos($url, '"') !== false)
{
return false;
}
if (strncmp($url, 'http://', 7) !== 0 and strncmp($url, 'https://', 8) !== 0)
{
return false;
}
return filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED)!==false;
}