mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Link URLs in select
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1163 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -501,6 +501,15 @@ function is_email($email) {
|
||||
return eregi("^$atom+(\\.$atom+)*@($domain?\\.)+$domain\$", $email);
|
||||
}
|
||||
|
||||
/** Check whether the string is URL address
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function is_url($string) {
|
||||
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
|
||||
return preg_match("~^https?://($domain?\\.)+$domain(:[0-9]+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string); //! restrict path, query and fragment characters
|
||||
}
|
||||
|
||||
/** Print header for hidden fieldset (close by </div></fieldset>)
|
||||
* @param string
|
||||
* @param string
|
||||
|
Reference in New Issue
Block a user