bugGNU Gengetopt - Bugs: bug #36028, Problem escaping quotes

 
 

bug #36028: Problem escaping quotes

Submitted by:  None
Submitted on:  Wed 28 Mar 2012 08:52:17 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 29 Mar 2012 07:40:18 AM UTC, comment #1:

Find attached a possible fix for (2). Note that this will still fail if the line ends in a comment with a quote.

(file #25503)

Anonymous
Wed 28 Mar 2012 08:52:17 PM UTC, original submission:

1. Escaping quotes on the command line works, e.g., gengetopt --unamed-opts="a \\\"b\\\"", but from within a ggo-file it does not: args "--unamed-opts=\"a b\""

2. Parsing config files with cmdline_parser_config_file() fails with unescaped quotes. Consider following example:

Running test_escape -t "test \"escape\"" with cmdline_parser_file_save("args.txt", ...) will create a file args.txt with test="test "escape"" (quotes are not escaped properly). Parsing that file fails:
test_escape:args.txt:1: malformed string in configuration file

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25503:  c_source.h_skel.diff added by None (580B - application/octet-stream - Patch cmdline_parser_config_file() to support quotes in optargs)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Thu 29 Mar 2012 07:40:18 AM UTCNoneAttached File-=>Added c_source.h_skel.diff, #25503

Back to the top


Powered by Savane 3.1-cleanup