Changeset 32536 for main/trunk/greenstone2/perllib/docprint.pm
- Timestamp:
- 2018-10-24T20:11:33+13:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/docprint.pm
r32532 r32536 27 27 # Greenstone XML format. 28 28 # This is used by GreenstoneXMLPlugout and doc.pm 29 # It's also used by GreenstoneSQLPlugout to output a doc_obj's meta and/or 30 # fulltxt to an SQL db, while subroutine unescape_text() is used by 31 # GreenstoneSQLPlugin for unescaping txt read back in. 29 32 30 33 package docprint; … … 117 120 } 118 121 122 # used by GreenstoneSQLPlugin when reading back from sqldb 123 sub unescape_text { 124 my ($text) = @_; 125 # special characters in the xml encoding 126 $text =~ s/& &/&&/g; 127 $text =~ s/&/&/g; # this has to be first... 128 $text =~ s/</</g; 129 $text =~ s/>/>/g; 130 $text =~ s/"/"/g; 131 132 return $text; 133 } 134 119 135 1;
Note:
See TracChangeset
for help on using the changeset viewer.