root/lang/perl/mobirc/trunk/mobirc/lib/Mobirc/HTTPD/Filter/MailAddress.pm @ 916

Revision 916, 257 bytes (checked in by tokuhirom, 6 years ago)

lang/perl/mobirc: now text filter is pluggable(WARNINGS: INCOMPATIBLE CHANGE!!)

Line 
1package Mobirc::HTTPD::Filter::MailAddress;
2use strict;
3use warnings;
4
5sub process {
6    my ( $class, $text, $conf ) = @_;
7
8    $text =~ s!\b(\w[\w.+=-]+\@[\w.-]+[\w]\.[\w]{2,4})\b!<a href="mailto:$1" class="mail_address">$1</a>!g;
9
10    return $text;
11}
12
131;
Note: See TracBrowser for help on using the browser.