| 1 | package CGI::Untaint::printable; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use base 'CGI::Untaint::object'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | sub _untaint_re { |
|
Subroutine
_untaint_re: called CC=1 SCAR=0.0
| |||
| 7 | 2 | qr/^([\040-\377\r\n\t]*)$/; | |
| 8 | } | ||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | CGI::Untaint::printable - validate as a printable value | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | my $name = $handler->extract(-as_printable => 'name'); | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | This Input Handler verifies that it is dealing with an 'printable' | ||
| 21 | string i.e. characters in the range \040-\377 (plus \r and \n). | ||
| 22 | |||
| 23 | The empty string is taken to be printable. | ||
| 24 | |||
| 25 | This is occasionally a useful 'fallback' pattern, but in general you | ||
| 26 | will want to write your own patterns to be stricter. | ||
| 27 | |||
| 28 | =cut | ||
| 29 | |||
| 30 | 2 | 1; | |