Skip to content

fix: escape single quotes in curl command payload #2224 - #2225

Merged
lbroudoux merged 1 commit into
masterfrom
fix/curl-clipboard-single-quote-escaping
Jul 28, 2026
Merged

lbroudoux merged 1 commit into
masterfrom
fix/curl-clipboard-single-quote-escaping

Conversation

@SebastienDegodez

Copy link
Copy Markdown
Member

This pull request improves the handling and testing of cURL command generation in the ServiceDetailPageComponent. The main focus is on correctly escaping apostrophes in JSON payloads to ensure the generated cURL commands remain valid and functional, especially when the payload contains single quotes.

Bug Fixes and Improvements:

Testing Enhancements:

  • Add a new unit test suite (service-detail.page.spec.ts) that verifies cURL command generation, specifically testing that JSON payloads containing apostrophes are correctly escaped and can be parsed back to their original content.

@SebastienDegodez
SebastienDegodez force-pushed the fix/curl-clipboard-single-quote-escaping branch from e2f82f8 to d79f944 Compare July 16, 2026 20:44
@SebastienDegodez
SebastienDegodez marked this pull request as ready for review July 16, 2026 20:45
@sonarqubecloud

Copy link
Copy Markdown

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @SebastienDegodez

@lbroudoux
lbroudoux merged commit fb65200 into master Jul 28, 2026
21 checks passed
lbroudoux pushed a commit that referenced this pull request Aug 5, 2026
Signed-off-by: SebastienDegodez <[email protected]>
(cherry picked from commit fb65200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug report: "Copy curl command to clipboard" breaks when the body contains a single quote

2 participants