summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/mailto.pm
diff options
context:
space:
mode:
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.pm19
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;