CGI::Untaint::url - validate a URL


CGI-Untaint-url documentation  | view source Contained in the CGI-Untaint-url distribution.

Index


NAME

Top

CGI::Untaint::url - validate a URL

SYNOPSIS

Top

  use CGI::Untaint;
  my $handler = CGI::Untaint->new($q->Vars);

  my $url = $handler->extract(-as_url => 'web_address');

DESCRIPTION

Top

is_valid

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.

SEE ALSO

Top

URI::URL. URI::Find::Schemeless::Stricter.

AUTHOR

Top

Tony Bowden

BUGS and QUERIES

Top

Please direct all correspondence regarding this module to: bug-CGI-Untaint-url@rt.cpan.org

COPYRIGHT

Top


CGI-Untaint-url documentation  | view source Contained in the CGI-Untaint-url distribution.