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
[YAML] properly mask escape sequences in quoted strings #11850
Conversation
xabbuh
commented
Sep 4, 2014
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #11789 |
License | MIT |
Doc PR |
shoudn't this be handled by the escaping of backslahes already ? It is actually a matter of a backslash followed by another char |
hmm, actually, we are only escaping doubled backslahes, which is wrong IMO. we should escape all backslashes to be safe Btw, your own list is incomplete. There is more escaped chars in YAML: http://www.yaml.org/spec/1.2/spec.html#id2776092 |
You're right. I tried escaping first which didn't work. But I guess that was simply a matter of where they have been placed. |
I think it is a matter of replacing the first element to escape single backslahes |
I modified the escaper. This should now work as expected. |
And I added some more tests (mainly to ensure that constructs like |
👍 |
1 similar comment
👍 |
Thank you @xabbuh. |
…abbuh) This PR was merged into the 2.3 branch. Discussion ---------- [YAML] properly mask escape sequences in quoted strings | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #11789 | License | MIT | Doc PR | Commits ------- a7d0cf2 properly mask escape sequences in quoted strings