Changeset 2717 for trunk/gsdl


Ignore:
Timestamp:
2001-08-28T17:12:41+12:00 (23 years ago)
Author:
jrm21
Message:

Do some email munging - @ symbols become @. Both netscape and IE can
cope with mailto: links like this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/EMAILPlug.pm

    r2681 r2717  
    77# University of Waikato, New Zealand.
    88#
    9 # Copyright (C) 1999 New Zealand Digital Library Project
     9# Copyright (C) 1999-2001 New Zealand Digital Library Project
    1010#
    1111# This program is free software; you can redistribute it and/or modify
     
    8080    my $self = new BasPlug ("EMAILPlug", @_);
    8181    # make sure we don't run textcat (defaults to "auto");
    82     $self->{'input_encoding'}="ascii"; # this might not be good enough...
     82    $self->{'input_encoding'}="iso_8859_1"; # this might not be good enough...
    8383    return bless $self, $class;
    8484}
     
    185185    }
    186186    $fromaddrmeta=~s/<//; $fromaddrmeta=~s/>//;
     187    # minor attempt to prevent spam-bots from harvesting addresses...
     188    $fromaddrmeta=~s/@/&#64;/;
    187189    $doc_obj->add_utf8_metadata ($cursection, "FromAddr", $fromaddrmeta);
    188190
     
    195197    # if name is an address
    196198    $fromnamemeta =~ s/<//g; $fromnamemeta =~ s/>//g;
     199    $fromnamemeta=~s/@/&#64\;/;
    197200    $doc_obj->add_utf8_metadata ($cursection, "FromName", $fromnamemeta);
    198201
     
    256259    $Headers = &text_into_html($Headers);
    257260    $Headers = "No headers" unless ($Headers =~ /\w/);
     261    $Headers =~ s/@/&#64\;/g;
    258262    $doc_obj->add_utf8_metadata ($cursection, "Headers", $Headers);
    259263
Note: See TracChangeset for help on using the changeset viewer.