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
[Serializer] Add XmlEncoder::CDATA_WRAPPING_PATTERN
context option
#54663
Merged
fabpot
merged 1 commit into
symfony:7.1
from
alexpozzi:issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
May 2, 2024
Merged
[Serializer] Add XmlEncoder::CDATA_WRAPPING_PATTERN
context option
#54663
fabpot
merged 1 commit into
symfony:7.1
from
alexpozzi:issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
May 2, 2024
+61
−7
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexpozzi
force-pushed
the
issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
branch
4 times, most recently
from
April 18, 2024 14:55
39f0428
to
105a952
Compare
clementvtrd
approved these changes
Apr 18, 2024
OskarStark
reviewed
Apr 19, 2024
OskarStark
reviewed
Apr 19, 2024
OskarStark
reviewed
Apr 19, 2024
src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
Outdated
Show resolved
Hide resolved
OskarStark
reviewed
Apr 19, 2024
src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
Outdated
Show resolved
Hide resolved
OskarStark
changed the title
[Serializer] Add XmlEncoder::CDATA_WRAPPING_PATTERN context option
[Serializer] Add Apr 19, 2024
XmlEncoder::CDATA_WRAPPING_PATTERN
context option
nicolas-grekas
approved these changes
Apr 23, 2024
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.
Please fix @OskarStark's comments and GTM, thanks.
alexpozzi
force-pushed
the
issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
branch
2 times, most recently
from
April 29, 2024 06:29
5e25e13
to
06ccf50
Compare
Hello @nicolas-grekas, |
alexpozzi
force-pushed
the
issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
branch
from
April 29, 2024 06:33
06ccf50
to
43e0750
Compare
GTM = Good to me 😃 |
OskarStark
reviewed
Apr 29, 2024
src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
Outdated
Show resolved
Hide resolved
alexpozzi
force-pushed
the
issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
branch
from
April 29, 2024 11:40
43e0750
to
129bb3f
Compare
alexpozzi
force-pushed
the
issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
branch
2 times, most recently
from
April 30, 2024 10:26
8b5f95c
to
8edf532
Compare
OskarStark
reviewed
Apr 30, 2024
src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
Outdated
Show resolved
Hide resolved
alexpozzi
force-pushed
the
issue-54155/add-the-ability-to-confiure-cdata-wrapper-pattern
branch
from
April 30, 2024 15:28
8edf532
to
8ab57d1
Compare
OskarStark
approved these changes
Apr 30, 2024
fabpot
approved these changes
May 2, 2024
Thank you @alexpozzi. |
This was referenced May 2, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all thank you for all your hard work!
This PR adds the ability to configure the CDATA wrapping pattern to give more flexibility on when to wrap values in a CDATA section.
For example, XML validators are not allowing double and single quotes outside of a CDATA section, with this change we could be able to change the pattern from
/[<>&]/
to/[<>&"\']/
and solve that issue without the need of writing a custom XMLEncoder.