Ticket #892: quotesandbackslashesfix(modified).patch

File quotesandbackslashesfix(modified).patch, 1.7 KB (added by Georgiy Litvinov, 9 years ago)

patch to fix this issue

  • gs2build/perllib/classify.pm

    diff --git a/gs2build/perllib/classify.pm b/gs2build/perllib/classify.pm
    index a740972..29e23dd 100755
    a b sub load_classifiers {  
    166166        push @newoptions, $opt;
    167167        #}
    168168    }
    169 
     169    foreach my $newopt (@newoptions) {
     170        $newopt =~ s/\\?\"/backslasheddoublequote/g;
     171        $newopt =~ s/\\/\\\\/g;
     172        }
    170173    map { $_ = "\"$_\""; } @newoptions;
    171174    my $options .= join (",", @newoptions);
    172175
  • gs2build/perllib/classify/List.pm

    diff --git a/gs2build/perllib/classify/List.pm b/gs2build/perllib/classify/List.pm
    index 907db7d..2d6032e 100755
    a b sub new  
    272272    foreach my $metadata_group (@metadata_groups) {
    273273        my $removeprefix_expr_within_levelelem = shift(@removeprefix_exprs_within_levellist);
    274274        if (defined($removeprefix_expr_within_levelelem) && $removeprefix_expr_within_levelelem ne "") {
     275        #recovery backslashed double quote
     276                $removeprefix_expr_within_levelelem =~ s/backslasheddoublequote/\\\"/g;
    275277        # Remove the other ' at the beginning and the end if there is any
    276278        $removeprefix_expr_within_levelelem =~ s/^'//;
    277279        $removeprefix_expr_within_levelelem =~ s/'$//;
    sub new  
    289291    foreach my $metadata_group (@metadata_groups) {
    290292        my $removesuffix_expr_within_levelelem = shift(@removesuffix_exprs_within_levellist);
    291293        if (defined($removesuffix_expr_within_levelelem) && $removesuffix_expr_within_levelelem ne "") {
     294        #recovery backslashed double quote
     295        $removesuffix_expr_within_levelelem =~ s/backslasheddoublequote/\\\"/g;
    292296        $removesuffix_expr_within_levelelem =~ s/^'//;
    293297        $removesuffix_expr_within_levelelem =~ s/'$//;
    294298        # Remove the extra $ at the end