Skip to content

fix: Escape quotes and backslashes when quoting whitespace#204

Merged
k9withabone merged 1 commit intocontainers:mainfrom
pipex:quote-whitespace-escape-quotes
Apr 7, 2026
Merged

fix: Escape quotes and backslashes when quoting whitespace#204
k9withabone merged 1 commit intocontainers:mainfrom
pipex:quote-whitespace-escape-quotes

Conversation

@pipex
Copy link
Copy Markdown
Contributor

@pipex pipex commented Mar 31, 2026

QuotedWhitespace adds a quote (") around whitespaced strings, but it doesn't escape existing quotes inside the string leading to potentially wrong metadata being passed to entities created via quadlets.

This escapes existing quotes and backslashes to ensure the generated output matches the intention of the user.

Change-type: patch
Fixes: #202

@pipex pipex force-pushed the quote-whitespace-escape-quotes branch from 031a7b4 to 687c773 Compare March 31, 2026 15:32
@k9withabone k9withabone added the bug Something isn't working label Mar 31, 2026
Copy link
Copy Markdown
Member

@k9withabone k9withabone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! This looks good! Seems like you just need to make sure your commit author email and your sign-off email match.

@k9withabone k9withabone added this to the v0.3.2 milestone Apr 1, 2026
QuotedWhitespace adds a quote (`"`) around whitespaced strings, but it
doesn't escape existing quotes inside the string leading to potentially
wrong metadata being passed to entities created via quadlets.

This escapes existing quotes and backslashes to ensure the generated
output matches the intention of the user.

Change-type: patch
Fixes: containers#202
Signed-off-by: Felipe Lalanne <felipe@balena.io>
@pipex pipex force-pushed the quote-whitespace-escape-quotes branch from 687c773 to 046db49 Compare April 1, 2026 17:35
@pipex
Copy link
Copy Markdown
Contributor Author

pipex commented Apr 2, 2026

Updated the commit email @k9withabone, thanks for the review!

@k9withabone k9withabone merged commit 263e584 into containers:main Apr 7, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QuotedWhitespace does not escape quotes

2 participants