Changeset 12678


Ignore:
Timestamp:
2006-09-05T15:38:22+12:00 (18 years ago)
Author:
kjdon
Message:

added stuff to strip new lines and escaped quotes from collection meta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/bin/script/convert_coll_from_gs2.pl

    r12236 r12678  
    153153            if ($entry =~ /^icon/) {
    154154            $value = format_icon_value($value);
     155            } else {
     156            $value = tidy_up_metadata($value);
    155157            }
    156158            &output_display($collwriter, $name, $lang, $value);
     
    475477    }
    476478    }
     479    return $value;
     480}
     481
     482sub tidy_up_metadata {
     483    my ($value) = @_;
     484    # remove \n
     485    $value =~ s/\\n//g;
     486    # replace \' with '
     487    $value =~ s/\\\'/\'/g;
     488    # replace \" with "
     489    $value =~ s/\\\"/\"/g;
    477490    return $value;
    478491}
Note: See TracChangeset for help on using the changeset viewer.