Commit e4258c40 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Template: A new filter mailbox().

parent 256f600d
......@@ -204,6 +204,17 @@ sub wrap {
};
}
sub _mailbox {
my ($context, $email, $comment) = @_;
return sub {
my $text = shift;
return Sympa::Tools::Text::addrencode($email, $text,
Conf::lang2charset($language->get_lang), $comment);
};
}
sub _mailto {
my ($context, $email, $query, $nodecode) = @_;
......@@ -403,6 +414,7 @@ sub parse {
helploc => [\&maketext, 1],
locdt => [\&locdatetime, 1],
wrap => [\&wrap, 1],
mailbox => [\&_mailbox, 1],
mailto => [\&_mailto, 1],
mailtourl => [\&_mailtourl, 1],
obfuscate => [\&_obfuscate, 1],
......@@ -631,6 +643,29 @@ A string representing date/time:
=back
=item mailbox ( email, [ comment ] )
Generates mailbox string appropriately encoded to suit for addresses
in header fields.
=over
=item Filtered text
Display name, if any.
=item email
E-mail address.
=item comment
Comment, if any.
=back
This filter was introduced on Sympa 6.2.42.
=item mailto ( email, [ {key =E<gt> val, ...}, [ nodecode ] ] )
Generates HTML fragment linking to C<mailto:> URL,
......
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