Entity(), DecodeURI(), and EncodeURI() should return undef for any
undefined input. Only string behaviour was specified, so users relying
on this did so at their own risk (and they can always disable warnings
like the careless bitches they are :P).
Not too coincidently also silences warnings in PLP::Functions itself.
- Fix everything() wrapper (broke pre-3.20 CGI scripts on 3.20)
- Fix everything() wrapper (broke pre-3.20 CGI scripts on 3.20)
+- Encoding functions retain undef
- Add charset to Content-Type header for UTF-8 output
- Test pod coverage
- %header values containing newlines will be sent as multiple fields
- Add charset to Content-Type header for UTF-8 output
- Test pod coverage
- %header values containing newlines will be sent as multiple fields
sub Entity (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
sub Entity (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
eval {
s/&/&/g;
s/"/"/g;
eval {
s/&/&/g;
s/"/"/g;
sub DecodeURI (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
sub DecodeURI (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
eval {
tr/+/ /; # Browsers do tr/ /+/ - I don't care about RFCs, but
# I do care about real-life situations.
eval {
tr/+/ /; # Browsers do tr/ /+/ - I don't care about RFCs, but
# I do care about real-life situations.
sub EncodeURI (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
sub EncodeURI (@) {
my $ref = defined wantarray ? [@_] : \@_;
for (@$ref) {
eval {
s{([^A-Za-z0-9\-_.!~*'()/?:@\$,])}{sprintf("%%%02x", ord $1)}ge;
};
eval {
s{([^A-Za-z0-9\-_.!~*'()/?:@\$,])}{sprintf("%%%02x", ord $1)}ge;
};