Ignore:
Timestamp:
09/07/17 17:57:31 (3 years ago)
Author:
ak19
Message:

Bugfix to depositor: commas in metadata entered through the depositor were not being preserved, as commas were used to split the many fields (of form cgi params) on in depositoraction.cpp. Now depositor.dm escapes the commas with URL encoding in the metadatafields section of the depositor step1 form, while depositoraction.cpp decodes the URL-encoded commas again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/depositoraction.cpp

    r31687 r31951  
    833833            cerr << "args val = "<<args_val<<endl;
    834834            decode_cgi_arg(args_val);
    835             cerr << "decoded" << args_val<<endl;
     835            cerr << "decoded = " << args_val<<endl;
    836836            text_t args_suffix = substr(args_name.begin()+prefix_len+3,args_name.end());
    837837
     
    846846                metadata_file += args_suffix;
    847847                metadata_file += "\">";
    848                 metadata_file += xml_safe(mdvalues[i]);
     848                // originally literal commas entered for metadata like dc.Subject
     849                // come in (extra) URL encoded, as %2C at this point in the code
     850                // Decode any commas now before writing them into metadata.xml
     851                metadata_file += xml_safe(decode_commas(mdvalues[i]));
    849852                metadata_file += "</Metadata>\n";
    850853
Note: See TracChangeset for help on using the changeset viewer.