Skip to content

Commit c6d3512

Browse files
committed
Add missing XML serializer's CDATA options
1 parent 697b047 commit c6d3512

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

components/serializer.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,11 +1200,17 @@ Option Description
12001200
``remove_empty_tags`` If set to true, removes all empty tags in the ``false``
12011201
generated XML
12021202
``cdata_wrapping`` If set to false, will not wrap any value ``true``
1203-
containing one of the following characters (
1204-
``<``, ``>``, ``&``) in `a CDATA section`_ like
1205-
following: ``<![CDATA[...]]>``
1203+
matching the ``cdata_wrapping_pattern`` regex in
1204+
`a CDATA section`_ like following:
1205+
``<![CDATA[...]]>``
1206+
``cdata_wrapping_pattern`` A regular expression pattern to determine if a ``/[<>&]/``
1207+
value should be wrapped in a CDATA section
12061208
============================== ================================================= ==========================
12071209

1210+
.. versionadded:: 7.1
1211+
1212+
The `cdata_wrapping_pattern` option was introduced in Symfony 7.1.
1213+
12081214
Example with custom ``context``::
12091215

12101216
use Symfony\Component\Serializer\Encoder\XmlEncoder;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy