Show
Ignore:
Timestamp:
03/10/07 23:56:37 (3 years ago)
Author:
eevee
Message:

Fixed: About page was missing the 'email' format it uses.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/View/TT.pm

    r21 r45  
    4949        timespan    => \&_format_timespan, 
    5050        date        => \&_format_date,  # later this may have to change to use user's date prefs 
    51     #                email_text      => sub { $_[0] =~ s/([\x21-\x7e])/'&#'.ord($1).';'/ge; return shift }, 
    52     #                email_link      => sub { $_[0] =~ s/([\x21-\x7e])/'&#'.ord($1).';'/ge; return shift }, 
     51        email       => \&_obfuscate_email, 
    5352    #                wordcap         => \&Vee::wordcap, 
    5453    }, 
     
    6766 
    6867=cut 
     68 
     69=head2 _obfuscate_email 
     70 
     71Convert an email address into a format that can (in theory) be read by humans 
     72but not by bots. 
     73 
     74=cut 
     75 
     76sub _obfuscate_email { 
     77    my ($email) = @_; 
     78    $email =~ s/ ([\x21-\x7e]) / '&#' . ord($1) . ';' /gex; 
     79    return $email; 
     80} 
    6981 
    7082=head2 _format_date