CGI-Minimal

 view release on metacpan or  search on metacpan

lib/CGI/Minimal.pod  view on Meta::CPAN


=back

=cut

=over 4

=item url_decode($string);

Returns URL *decoding* of input string (%xx and %uxxxx substitutions
are decoded to their actual values).

Example:

 my $url_decoded_string = $cgi->url_decode($string);

=back

=cut

=over 4

=item htmlize($string);

Returns HTML 'safe' encoding of input string. Replaces &,>,< and "

t/02_encodings.t  view on Meta::CPAN


        }
        if (0 < @failed_encoding_code_points) {
            return "failed to handle encoding characters for decimal character points " . join(', ',@failed_encoding_code_points); 
        }
    }

    my @failed_decoding_code_points = ();
    for (my $counter = 0; $counter < 256; $counter++) {
        my $encoded_char = $encoding_table[$counter];
        my $decoded_char = CGI::Minimal->url_decode($encoded_char);
        unless (chr($counter) eq $decoded_char) {
            push (@failed_decoding_code_points, $encoded_char);
        }
    }
    unless (CGI::Minimal->url_decode('+') eq '') {
        push (@failed_decoding_code_points, '+');
    }
    if (0 < @failed_encoding_code_points) {
        return "failed to handle decoding " . join(' ',@failed_decoding_code_points); 
    }



( run in 3.481 seconds using v1.01-cache-2.11-cpan-a9ef4e587e4 )