Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (57 sloc) 2 KB
__NAME__ purpose
make all kinds of URLs clickable
__END__
__NAME__ see also
mailto
__END__
__NAME__ description
The filter searches the input for all kinds of links, and wraps them
into the standard &glos-HTML; <a href=></a> package.
</para><para>
The filter can recognize all sorts of URLs and to a great detail.
__END__
__NAME__ notes
For more information on &PERL; Regular Expressions, pattern matching and
character classes, see
<citerefentry><refentrytitle>perlre</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para><para>
The matching expressions were generated with the help of
Abigail's
<ulink url="http://ucan.foad.org/~abigail/Perl/url2.html">Regex for URLs</ulink> (link appears broken, and no replacement found).
</para><para>
To save on processing time, only the most common protocols
(http/https, ftp and mailto) are actually enabled in the filter.
For the rest of the protocols, you need to uncomment the appropriate
lines in the filter source and restart &IC;.
__END__
__NAME__ author
&docelic;
__END__
__NAME__ online: Filter example
Here's an incomplete collection of URLs that the filter can recognize.
<programlisting><![CDATA[
[filter liven_urls]
http://www.clusty.com/
ftp://@host.com/
ftp://host.com/
ftp://foo:@host.com/
ftp://myname@host.dom/%2Fetc/motd
ftp://myname@host.dom/etc/motd
ftp://myname@host.dom//etc/motd
mailto:noaddress@host.dom
file://vms.host.edu/disk$user/my/notes/note12345.txt
prospero://host.dom//pros/name
ldap:///o=University%20of%20Michigan,c=US
ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US
ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress
ldap:///o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)
ldap://ldap.itd.umich.edu/c=GB?objectClass?one
z39.50s://melvyl.ucop.edu/cat
z39.50r://melvyl.ucop.edu/mags?elecworld.v30.n19
z39.50r://cnidr.org:2100/tmf?bkirch_rules__a1;esn=f;rs=marc
mid:foo4%25foo1@bar.net
cid:foo4*foo1@bar.net
mid:960830.1639@XIson.com/partA.960830.1639@XIson.com
[/filter]
]]></programlisting>
__END__