Changeset 9119


Ignore:
Timestamp:
2005-02-21T13:43:15+13:00 (19 years ago)
Author:
kjdon
Message:

convert & to & in metadata before writing it out to metadata.xml, otherwise parsing it in will crap out

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/explode_metadata_database.pl

    r9041 r9119  
    180180    $file_name =~ s/\[/\\\[/g;
    181181    $file_name =~ s/\]/\\\]/g;
    182 
     182   
    183183    print $metadata_xml_file
    184184    "\n" .
     
    203203    $value =~ s/>/>/g;
    204204
     205    # we are not allowed & in xml except in entities.
     206    # if there are undefined entities then parsing will also crap out.
     207    # should we be checking for them too?
     208    # this may not get all possibilities
     209    $value =~ s/&([^;\s]*(\s|$))/&$1/g;
     210
    205211    print $metadata_xml_file "      <Metadata mode=\"accumulate\" name=\"$meta_prefix$field\">$value</Metadata>\n";
    206212    }
Note: See TracChangeset for help on using the changeset viewer.