Changeset 28783
- Timestamp:
- 2014-01-15T14:12:32+13:00 (9 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/MARCPlugin.pm
r27141 r28783 366 366 if (defined $meta_value) { 367 367 # Square brackets in metadata values need to be escaped so they don't confuse Greenstone/GLI 368 369 # Important! Check that this really works!! In MARCXMLPlugin 370 # it maps these characters to \\\\[ \\\\] 371 368 372 $meta_value =~ s/\[/&\#091;/g; 369 373 $meta_value =~ s/\]/&\#093;/g; -
main/trunk/greenstone2/perllib/plugins/MARCXMLPlugin.pm
r27503 r28783 415 415 } 416 416 417 ## escape [ and ] 418 $meta_value =~ s/\[/\\\[/g; 419 $meta_value =~ s/\]/\\\]/g; 420 ##print STDERR "$meta_name=$meta_value\n"; 417 my $gs_mode = ($ENV{'GSDL3SRCHOME'}) ? "gs3" : "gs2"; 418 419 if ($gs_mode eq "gs2") { 420 ## escape [ and ] 421 $meta_value =~ s/\[/\\\[/g; 422 $meta_value =~ s/\]/\\\]/g; 423 424 # The following is how MARCPlug does this 425 # If this is really OK for Greenstone2, then consider 426 # to switching to this, as this would mean we 427 # wouldn't need a special gs2/gs3 test here! 428 429 # $meta_value =~ s/\[/&\#091;/g; 430 # $meta_value =~ s/\]/&\#093;/g; 431 432 ##print STDERR "$meta_name=$meta_value\n"; 433 } 434 421 435 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(),$meta_name, $meta_value); 422 436
Note:
See TracChangeset
for help on using the changeset viewer.