diff options
author | Norbert Preining <norbert@preining.info> | 2022-04-04 03:14:42 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-04-04 03:14:42 +0000 |
commit | 7548e4d37c2aaefd32fe0a9bcd83f8e71326dde1 (patch) | |
tree | d335b608e63e9b3c37d7ba0e567c63e77250e171 /systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm | |
parent | 506de1e2d3515161cdbc7018b4ccc9e49d7f86e8 (diff) |
CTAN sync 202204040314
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm index 2ed4275706..5d6f241080 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm @@ -3,7 +3,7 @@ package URI::mailto; # RFC 2368 use strict; use warnings; -our $VERSION = '5.07'; +our $VERSION = '5.10'; use parent qw(URI URI::_query); @@ -38,7 +38,7 @@ sub to } -sub headers +sub headers { my $self = shift; @@ -70,4 +70,19 @@ sub headers URI->new("mailto:?$opaque")->query_form; } +# https://datatracker.ietf.org/doc/html/rfc6068#section-5 requires +# plus signs (+) not to be turned into spaces +sub query_form +{ + my $self = shift; + my @fields = $self->SUPER::query_form(@_); + for ( my $i = 0 ; $i < @fields ; $i += 2 ) { + if ( $fields[0] eq 'to' ) { + $fields[1] =~ s/ /+/g; + last; + } + } + return @fields; +} + 1; |