Commit 62c39d3f authored by sikeda's avatar sikeda
Browse files

[bug] WWSympa: viewbounce & viewmod: If the list name or the email address...

[bug] WWSympa: viewbounce & viewmod: If the list name or the email address contains "+", incorrect web links to attachments are generated.
Fixed by encoding special characters in generated links.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12948 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 1b907b02
......@@ -11162,8 +11162,7 @@ sub do_viewbounce {
Sympa::Archive::html_format(
$bounce_message,
'destination_dir' => $html_dir,
'attachment_url' =>
sprintf('viewbounce/%s/%s', $list->{'name'}, $html_relpath),
'attachment_url' => ['viewbounce', $list->{'name'}, $html_relpath]
) if $bounce_message;
}
 
......
......@@ -867,6 +867,10 @@ sub html_format {
my $destination_dir = $opts{'destination_dir'};
my $attachment_url = $opts{'attachment_url'};
if (ref $attachment_url eq 'ARRAY') {
$attachment_url = join '/',
map { Sympa::Tools::Text::encode_uri($_) } @$attachment_url;
}
my $mhonarc_ressources =
Sympa::search_fullpath($that, 'mhonarc-ressources.tt2');
......@@ -1231,6 +1235,11 @@ Base URL used to link attachments.
Note:
On 6.2.13 and earlier, this option was named "C<attachB<e>ment_url>".
Note:
On 6.2.17 and later, this option may take an arrayref value.
In such case items will be percent-encoded and conjuncted.
Otherwise if a string is given, it will not be encoded.
=back
=item get_id ( )
......
......@@ -108,7 +108,7 @@ sub html_store {
$message,
destination_dir =>
join('/', $self->{html_base_directory}, $list_id, $modkey),
attachment_url => sprintf('viewmod/%s/%s', $listname, $modkey),
attachment_url => ['viewmod', $listname, $modkey]
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment