.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Template::Plugin::Clickable 3pm"
.TH Template::Plugin::Clickable 3pm "2022-06-17" "perl v5.34.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Template::Plugin::Clickable \- Make URLs clickable in HTML
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 4
\& [% USE Clickable %]
\& [% FILTER clickable %]
\& URL is http://www.tt2.org/
\& [% END %]
.Ve
.PP
this will become:
.PP
.Vb 1
\& URL is http://www.tt2.org/
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Template::Plugin::Clickable is a plugin for \s-1TT,\s0 which allows you to
filter HTMLs clickable.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "target" 4
.IX Item "target"
.Vb 3
\& [% FILTER clickable target => \*(Aq_blank\*(Aq %]
\& [% message.body | html %]
\& [% END %]
.Ve
.Sp
\&\f(CW\*(C`target\*(C'\fR option enables you to set target attribute in A links. none
by default.
.IP "finder_class" 4
.IX Item "finder_class"
\&\f(CW\*(C`finder_class\*(C'\fR option enables you to set other \s-1URI\s0 finder class
rather than URI::Find (default). For example,
.Sp
.Vb 3
\& [% FILTER clickable finder_class => \*(AqURI::Find::Schemeless\*(Aq %]
\& Visit www.example.com/join right now!
\& [% END %]
.Ve
.Sp
this will become:
.Sp
.Vb 1
\& Visit www.example.com/join right now!
.Ve
.SH "NOTE"
.IX Header "NOTE"
If you use this module with \f(CW\*(C`html\*(C'\fR filter, you should be careful not
to break tags or brackets around the URLs. For example if you have a
following \s-1URL\s0 form,
.PP
.Vb 1
\&
.Ve
.PP
Clickable plugin will filter this into:
.PP
.Vb 1
\&
.Ve
.PP
which is bad for \s-1HTML\s0 viewing. However, if you \s-1HTML\s0 filter them first
and then clickable filter, you'll get:
.PP
.Vb 1
\& <http://www.example.com/>
.Ve
.PP
which href part is wrong.
.PP
You'd better try Template::Plugin::TagRescue in this case.
.PP
.Vb 7
\& [% USE Clickable \-%]
\& [% USE TagRescue \-%]
\& [% FILTER html_except_for(\*(Aqa\*(Aq) \-%]
\& [% FILTER clickable \-%]
\&
\& [%\- END %]
\& [%\- END %]
.Ve
.PP
will give you the right format.
.SH "AUTHOR"
.IX Header "AUTHOR"
Tatsuhiko Miyagawa
.PP
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Template, URI::Find, Template::Plugin::TagRescue