From: Jan Krüger Date: Wed, 28 Mar 2012 08:53:17 +0000 (+0200) Subject: Girocco::Util: Accept web URLs with port number X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/9322b08776f5162db414ed256791744ffacf3c55 Girocco::Util: Accept web URLs with port number There's really no reason to reject URLs with an alternative port and it can be especially useful for stuff like JSON notify URLs when someone wants to directly notify a specialised HTTP server. --- diff --git a/Girocco/Util.pm b/Girocco/Util.pm index fe125ea..78fceab 100644 --- a/Girocco/Util.pm +++ b/Girocco/Util.pm @@ -107,7 +107,7 @@ sub valid_email_multi { } sub valid_web_url { $_ = $_[0]; - /^https?:\/\/[a-zA-Z0-9-.]+(\/[_\%a-zA-Z0-9.\/~:?&=;-]*)?(#[a-zA-Z0-9._-]+)?$/; + /^https?:\/\/[a-zA-Z0-9-.:]+(\/[_\%a-zA-Z0-9.\/~:?&=;-]*)?(#[a-zA-Z0-9._-]+)?$/; } sub valid_repo_url { $_ = $_[0];