Ignore:
Timestamp:
2010-09-23T17:22:05+12:00 (14 years ago)
Author:
davidb
Message:

Encode::decode cannot be applied to all characters returned by ghtml::getcharequiv(). If getcharequiv does not recognize a character then it does not encode it, and so we cannot apply decode() to it. getcharequiv() upgraded to include an optional extra param that says whether or not to decode the equiv char should there be one it can map it to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm

    r22857 r22951  
    12321232    # Convert entities to their UTF8 equivalents
    12331233    $$textref =~ s/&(lt|gt|amp|quot|nbsp);/&z$1;/go;
    1234     $$textref =~ s/&([^;]+);/&Encode::decode("utf8",ghtml::getcharequiv($1,1))/gseo;
     1234    $$textref =~ s/&([^;]+);/&ghtml::getcharequiv($1,1,1)/gseo;
    12351235    $$textref =~ s/&z(lt|gt|amp|quot|nbsp);/&$1;/go;
    12361236
Note: See TracChangeset for help on using the changeset viewer.