Skip to content

Conversation

@pierredup
Copy link
Member

@pierredup pierredup commented Oct 20, 2025

Fixes #1993

@pierredup pierredup added this to the 2.3.9 milestone Oct 20, 2025
@pierredup pierredup requested a review from Copilot October 20, 2025 17:35
@pierredup pierredup self-assigned this Oct 20, 2025
@pierredup pierredup added the bug label Oct 20, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for single quotes in sanitized form field values by adding a new form type extension and enabling it across multiple form types. This addresses issue #1993 where single quotes were being HTML-encoded (to ') in sanitized fields.

Key changes:

  • Created UnsanitizeSingleQuotesTypeExtension to handle conversion of HTML-encoded single quotes back to their original form
  • Enabled allow_single_quotes option on name/description fields across Tax, Quote, Invoice, Client, and Contact forms

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/CoreBundle/Form/TypeExtension/UnsanitizeSingleQuotesTypeExtension.php New form type extension that restores single quotes from HTML entities when enabled
src/TaxBundle/Form/Type/TaxType.php Enabled single quote support for tax name field
src/QuoteBundle/Form/Type/ItemType.php Enabled single quote support for quote item description field
src/InvoiceBundle/Form/Type/ItemType.php Enabled single quote support for invoice item description field
src/ClientBundle/Form/Type/ClientType.php Enabled single quote support for client name field
src/ClientBundle/Form/Type/ContactType.php Enabled single quote support for contact firstName and lastName fields
src/ClientBundle/Form/Type/ContactDetailType.php Enabled single quote support for contact detail value field

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Bundle Report

Changes will decrease total bundle size by 408.77kB (-5.12%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
solidinvoice-webpack-bundle-array-push 7.57MB -408.77kB (-5.12%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: solidinvoice-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
app.*.css -555 bytes 1.36MB -0.04%
email.*.css -152.22kB 504.16kB -23.19%
pdf.*.css -152.22kB 445.21kB -25.48%
648.*.js (New) 376.06kB 376.06kB 100.0% 🚀
709.*.css (New) 285.35kB 285.35kB 100.0% 🚀
core.*.css 11.28kB 12.31kB 1104.11% ⚠️
core.*.js 53 bytes 3.1kB 1.74%
355.*.js (Deleted) -446.4kB 0 bytes -100.0% 🗑️
847.*.css (Deleted) -330.13kB 0 bytes -100.0% 🗑️

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.61%. Comparing base (1eb9311) to head (b92777d).
⚠️ Report is 4 commits behind head on 2.3.x.

Additional details and impacted files
@@             Coverage Diff              @@
##              2.3.x    #2005      +/-   ##
============================================
+ Coverage     48.49%   48.61%   +0.11%     
- Complexity     2749     2755       +6     
============================================
  Files           501      502       +1     
  Lines         10025    10047      +22     
============================================
+ Hits           4862     4884      +22     
  Misses         5163     5163              
Flag Coverage Δ
unittests 48.61% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pierredup pierredup merged commit 58a2be0 into 2.3.x Oct 20, 2025
29 checks passed
@pierredup pierredup deleted the allow-single-quotes branch October 20, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants