Changeset 12705
- Timestamp:
- 2006-09-07T14:39:13+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ISISPlug.pm
r12703 r12705 214 214 # Parse the value off and add it as metadata 215 215 $raw_metadata_value =~ s/^([^\^]*)//; 216 my $sub_metadata_value = $1; 217 218 # Escape any '<' and '>' characters so they appear correctly in the final collection 219 $sub_metadata_value =~ s/\</</g; 220 $sub_metadata_value =~ s/\>/>/g; 216 my $sub_metadata_value = &escape_metadata_value($1); 221 217 222 218 # print STDERR "Sub metadata name: $sub_metadata_name, value: $sub_metadata_value\n"; … … 279 275 } 280 276 281 # Escape any '<' and '>' characters so they appear correctly in the final collection 282 $sub_metadata_value =~ s/\</</g; 283 $sub_metadata_value =~ s/\>/>/g; 277 # Escape the metadata value so it appears correctly in the final collection 278 $sub_metadata_value = &escape_metadata_value($sub_metadata_value); 284 279 285 280 # print STDERR "Sub metadata name: $sub_metadata_name, value: $sub_metadata_value\n"; … … 317 312 318 313 # Add the full raw record as metadata 319 $$textref =~ s/</<\;/g; 320 $$textref =~ s/>/>\;/g; 321 $doc_obj->add_utf8_metadata($section, "ISISRawRecord", $$textref); 314 my $isis_raw_record_metadata_value = &escape_metadata_value($$textref); 315 $doc_obj->add_utf8_metadata($section, "ISISRawRecord", $isis_raw_record_metadata_value); 322 316 323 317 # Add FileFormat metadata … … 376 370 377 371 372 sub escape_metadata_value 373 { 374 my $value = shift(@_); 375 $value =~ s/\</</g; 376 $value =~ s/\>/>/g; 377 $value =~ s/\\/\\\\/g; 378 return $value; 379 } 380 381 378 382 sub clean_up_after_exploding 379 383 {
Note:
See TracChangeset
for help on using the changeset viewer.