diff options
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/URI/mailto.pm')
-rw-r--r-- | Master/tlpkg/tlperl/site/lib/URI/mailto.pm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/URI/mailto.pm b/Master/tlpkg/tlperl/site/lib/URI/mailto.pm index 2ed4275706a..5d6f2410806 100644 --- a/Master/tlpkg/tlperl/site/lib/URI/mailto.pm +++ b/Master/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; |