-
-
Notifications
You must be signed in to change notification settings - Fork 213
Allow single quotes in sanitized values #2005
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
Conversation
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.
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
UnsanitizeSingleQuotesTypeExtensionto handle conversion of HTML-encoded single quotes back to their original form - Enabled
allow_single_quotesoption 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.
src/CoreBundle/Form/TypeExtension/UnsanitizeSingleQuotesTypeExtension.php
Show resolved
Hide resolved
src/CoreBundle/Form/TypeExtension/UnsanitizeSingleQuotesTypeExtension.php
Show resolved
Hide resolved
Bundle ReportChanges will decrease total bundle size by 408.77kB (-5.12%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: solidinvoice-webpack-bundle-array-pushAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #1993