CGI::Untaint::url - validate a URL
use CGI::Untaint; my $handler = CGI::Untaint->new($q->Vars); my $url = $handler->extract(-as_url => 'web_address');
This Input Handler verifies that it is dealing with a reasonable URL. This mostly means that it will find the first thing that looks like a URL in your input, where by "looks like", we mean anything that URI::URL thinks is sensible, (with some tweaks, courtesy of URI::Find::Schemeless::Stricter), so it will accept any of (for example):
http://c2.com/cgi/wiki www.tmtm.com See: http://www.redmeat.com/redmeat/1996-09-30/ [http://www.angelfire.com/la/carlosmay/Tof.html] ftp://ftp.ftp.org/
The resulting value will be a URI::URL object.
URI::URL. URI::Find::Schemeless::Stricter.
Tony Bowden
Please direct all correspondence regarding this module to: bug-CGI-Untaint-url@rt.cpan.org
Copyright (C) 2001-2005 Tony Bowden. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install CGI::Untaint::url, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Untaint::url
CPAN shell
perl -MCPAN -e shell install CGI::Untaint::url
For more information on module installation, please visit the detailed CPAN module installation guide.