Ignore:
Timestamp:
2023-09-19T10:41:42+12:00 (9 months ago)
Author:
davidb
Message:

Code updated to allow item files with brackets in the filename to work correctly when DocID is set to be its filename

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r37736 r38162  
    528528    print STDERR "Warning, identifier $OID contains periods or slashes(.\\\/), replacing them with _\n";
    529529    $OID =~ s/[\.\\\/]/_/g; #replace periods and slasshes with _
     530    }
     531    if ($OID =~ /(%28)|(%29)/) {
     532    print STDERR "Warning, identifier $OID contains encoded '(' or ')' parentheses , replacing them with _\n";
     533    $OID =~ s/(%28)|(%29)/_/g; #replace periods and slasshes with _
     534    }
     535    if ($OID =~ /(%5B)|(%5D)/) {
     536    print STDERR "Warning, identifier $OID contains encoded '[' or ']' parentheses , replacing them with _\n";
     537    $OID =~ s/(%5B)|(%5D)/_/g; #replace periods and slasshes with _
    530538    }
    531539    if ($OID =~ /^\s.*\s$/) {
Note: See TracChangeset for help on using the changeset viewer.