Changeset 1891
- Timestamp:
- 2001-02-01T15:26:44+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r1844 r1891 40 40 use BasPlug; 41 41 use ghtml; 42 use unicode; 42 43 use util; 43 44 use parsargv; … … 165 166 return 1; 166 167 } 168 169 170 167 171 168 172 sub replace_images { … … 520 524 } 521 525 526 527 # Extend the BasPlug read_file so that strings like é are 528 # converted to UTF8 internally. 529 # 530 # We don't convert < or > or & or " in case 531 # they interfere with the GML files 532 533 sub read_file { 534 my ($self, $filename, $encoding, $textref) = @_; 535 536 &BasPlug::read_file($self, $filename, $encoding, $textref); 537 538 # Convert things like é to their UTF8 equivalents 539 $$textref =~ s/&(lt|gt|amp|quot);/&z$1;/go; 540 $$textref =~ s/&([^;]+);/&unicode::ascii2utf8(\&ghtml::getcharequiv($1,1))/gseo; 541 $$textref =~ s/&z(lt|gt|amp|quot);/&$1;/go; 542 } 543 522 544 1;
Note:
See TracChangeset
for help on using the changeset viewer.