Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.189.2.90 -r1.189.2.91 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 24 Jun 2021 11:31:50 -0000 1.189.2.90 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 1 Jul 2021 10:36:44 -0000 1.189.2.91 @@ -2696,9 +2696,12 @@ ad_proc -public util_url_valid_p { query_url } { Returns 1 if a URL is a web URL (HTTP, HTTPS or FTP). + Refined regexp from https://mathiasbynens.be/demo/url-regex + @author Philip Greenspun (philg@mit.edu) + } { - return [regexp -nocase {^(http|https|ftp)://[^ ].+} [string trim $query_url]] + return [regexp -nocase {^(https?|ftp)://[^\s/$.?#].[^\s]*$} [string trim $query_url]] } ad_proc -public util::min { args } {