-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better handling of values containing backslashes #20
Comments
Seems like an issue in how the Http client receives/parses the option. Will some source diving later. |
The input is parsed by the StringInput class, which tokenises the input. Which is fine, but there it strips the slashes. Which in turn is passed back into our I'm doing some more digging wether or not it's possible to adapt the tokenisation, or if there's a way around this. // vendor/symfony/console/Input/StringInput.php:49
private function tokenize(string $input): array
{
(..)
} elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
$token .= stripcslashes(substr($match[0], 1, -1));
}
(..)
} |
@Treggats, again, I think if we |
For sure, but when calling this command it's parsed by the base command class. That's where the issue is. |
Interesting. I would still think there is a way to add slashes before passing the parameters to Artisan. Then again, can't be the only devs to pass slashed values to Artisan commands. So there's probably some option or double output happening elsewhere. I'll take a look. |
Currently backslashes (and possibly other characters) are being lost from values as they are passed through Artisan. These need to be escaped so they are preserved in the final output. An appropriately placed call to
addslashes
should to the trick.Example
curl
command:The text was updated successfully, but these errors were encountered: