Ignore:
Timestamp:
2003-02-07T10:52:59+13:00 (21 years ago)
Author:
jrm21
Message:

minor fix for "_" chars in urls... escape them after, not before.

Also print an warning message if we have an unsupported language encoding.

File:
1 edited

Legend:

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

    r3721 r3726  
    455455    $text =~ s/\"/"/g;
    456456
    457     $text =~ s@_@\\_@g; # protect against greenstone macros...
    458 
    459457    # convert email addresses and URIs into links
    460458# don't markup email addresses for now
     
    466464    # assume URI doesn't finish with a '.'
    467465    $text =~ s@((http|ftp|https)://[\w\-]+(\.[\w\-]+)*/?((&amp;|\.)?[\w\?\=\-_/~]+)*(\#[\w\.\-_]*)?)@<a href=\"$1\">$1<\/a>@g;
     466
     467    $text =~ s@_@\\_@g; # protect against greenstone macros...
    468468
    469469
     
    925925      # empty anyway. We'll try to continue, assuming 8859-1. We could strip
    926926      # characters out here if this causes problems...
     927      my $outhandle=$self->{'outhandle'};
     928      print $outhandle "EMAILPlug: falling back to iso-8859-1\n";
    927929      $$textref=&unicode::unicode2utf8(&unicode::convert2unicode("iso_8859_1",$textref));
    928930
Note: See TracChangeset for help on using the changeset viewer.