Changeset 19993

Show
Ignore:
Timestamp:
14.07.2009 13:19:37 (10 years ago)
Author:
ak19
Message:

Dr Bainbridge's fix to deal with spaces in metadata_fields option (spaces before angle brackets and around commas that separate a list of metadata fields).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/StructuredHTMLPlugin.pm

    r16104 r19993  
    371371 
    372372    my $orig_field = ""; 
    373     foreach my $field (split /,/, $self->{'metadata_fields'}) { 
     373    foreach my $field (split /\s*,\s*/, $self->{'metadata_fields'}) { 
    374374    # support tag<tagname> 
    375     if ($field =~ /^(.*?)<(.*?)>$/) { 
     375    if ($field =~ /^(.*?)\s*<(.*?)>$/) { 
    376376        # "$2" is the user's preferred gs metadata name 
    377377        $find_fields{lc($1)}=$2; # lc = lowercase