Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Util.stripLeadingAndTrailingQuotes is described as:
/** * Remove the leading and trailing quotes from <code>str</code>. * E.g. if str is '"one two"', then 'one two' is returned. * * @param str The string from which the leading and trailing quotes * should be removed. * * @return The string without the leading and trailing quotes. */
However, in cases where you have
"'one two'
the returned result is:
'one two'
This leads to unexpected results. For example, an option like:
-option 'command "suboption"'
ends up being parsed as:
command "suboption
The method should be modified to only strip unmatched quotes or a new method should be made and added to the API.