Changeset 22951

Show
Ignore:
Timestamp:
23.09.2010 17:22:05 (9 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.

Files:
1 modified

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