Changeset 3506 for trunk


Ignore:
Timestamp:
2002-10-29T17:23:42+13:00 (22 years ago)
Author:
jrm21
Message:

need to allow escaped \" inside a multiline "...". Eg

collectmetadata foo "

<a href=\"xyz\">link</a>
"

was not being correctly parsed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/cfgread.pm

    r3418 r3506  
    5353    $linecontinues = $line =~ s/\\$//;
    5454
    55     while ($line =~ s/\s*(\"[^\"]*\"|\'[^\']*\'|\S+)\s*//) {
     55    while ($line =~ s/\s*(\".*?[^\\]\"|\'.*?[^\\]\'|\S+)\s*//) {
    5656        if (defined $1) {
    5757        # remove any enclosing quotes
     
    6262        $entry =~ s/\$(\w+)/$ENV{$1}/g;
    6363        $entry =~ s/\$\{(\w+)\}/$ENV{$1}/g;
    64 
    6564        push (@line, $entry);
    6665        } else {
Note: See TracChangeset for help on using the changeset viewer.