diff --git a/include/functions.inc.php b/include/functions.inc.php index a7135a4f4..db8c457ee 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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; } diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index d8df4eea8..59fc97cac 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -1284,13 +1284,13 @@ function get_quick_search_results_no_cache($q, $options) $ids = qsearch_eval($expression, $qsr, $tmp, $search_results['qs']['unmatched_terms']); - $debug[] = "