-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
parser/keyvalue: handle escaped quotes when parsing #36176
parser/keyvalue: handle escaped quotes when parsing #36176
Conversation
0a3e582
to
b5342fd
Compare
Currently, the SplitString parser does not handle escaped quotes and instead will parse these as independent '\', '"' characters. This results in unexpected breakages between fields for strings like: > <key>="...\" ..." Here, the backslash will be appended to the result pair, while the (now un-)escaped quotation will result in the pair being terminated early. Add handling of escaped quotation marks (for both ", ') in the keyvalue parser along with a testcase to exercise this functionality. Signed-off-by: Ethan Adams <eadams@netflix.com>
b5342fd
to
b87144c
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Hello - wondering if there is anything I should be doing to drive this? If this is just pending review, I can bump on a newer |
…-in-keyvalue-parser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jadams41. Sorry for the delayed review.
…6176) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Currently, the keyvalue parser does handle escaped quotes and instead will parse this as independent '\', '"' characters. This results in unexpected breakages between fields for strings like: > <key>="...\\" ..." Here, the backslash will be appended to the result pair, while the (now un-)escaped quotation will result in the pair being terminated early. Add handling of escaped quotation marks (for both ", ') in the keyvalue parser along with a testcase to exercise this functionality. --------- Signed-off-by: Ethan Adams <eadams@netflix.com> Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
…6176) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Currently, the keyvalue parser does handle escaped quotes and instead will parse this as independent '\', '"' characters. This results in unexpected breakages between fields for strings like: > <key>="...\\" ..." Here, the backslash will be appended to the result pair, while the (now un-)escaped quotation will result in the pair being terminated early. Add handling of escaped quotation marks (for both ", ') in the keyvalue parser along with a testcase to exercise this functionality. --------- Signed-off-by: Ethan Adams <eadams@netflix.com> Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
…6176) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Currently, the keyvalue parser does handle escaped quotes and instead will parse this as independent '\', '"' characters. This results in unexpected breakages between fields for strings like: > <key>="...\\" ..." Here, the backslash will be appended to the result pair, while the (now un-)escaped quotation will result in the pair being terminated early. Add handling of escaped quotation marks (for both ", ') in the keyvalue parser along with a testcase to exercise this functionality. --------- Signed-off-by: Ethan Adams <eadams@netflix.com> Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Description
Currently, the keyvalue parser does handle escaped quotes and instead will parse this as independent '', '"' characters. This results in unexpected breakages between fields for strings like:
Add handling of escaped quotation marks (for both ", ') in the keyvalue parser along with a testcase to exercise this functionality.