mirror of
https://github.com/curl/curl.git
synced 2025-03-01 15:15:34 +08:00
tool_getparam: output warning for leading unicode quote character
... in the option argument. Typically this is a mistake done when copying example command lines from online documentation using the wrong quote character. Presumably there are also other potential quote characters that might be used, and this check is done without even knowing that unicode is used! Reported-by: Sanjay Pujare Fixes #13214 Closes #13215
This commit is contained in:
parent
aba8043075
commit
94db8e5c27
@ -1337,6 +1337,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
||||
warnf(global, "The file name argument '%s' looks like a flag.",
|
||||
nextarg);
|
||||
}
|
||||
else if(!strncmp("\xe2\x80\x9c", nextarg, 3)) {
|
||||
warnf(global, "The argument '%s' starts with a unicode quote where "
|
||||
"maybe an ASCII \" was intended?",
|
||||
nextarg);
|
||||
}
|
||||
}
|
||||
else if((a->desc == ARG_NONE) && !toggle) {
|
||||
err = PARAM_NO_PREFIX;
|
||||
|
Loading…
Reference in New Issue
Block a user