Skip to content

Commit 97bd669

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Serializer] Add documentation about a new XmlEncoder CDATA wrapping opt-out context option
2 parents 99f4ec6 + cb08b46 commit 97bd669

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/serializer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,8 +1160,16 @@ Option Description
11601160
``save_options`` XML saving `options with libxml`_ ``0``
11611161
``remove_empty_tags`` If set to true, removes all empty tags in the ``false``
11621162
generated XML
1163+
``cdata_wrapping`` If set to false, will not wrap any value ``true``
1164+
containing one of the following characters (
1165+
``<``, ``>``, ``&``) in `a CDATA section`_ like
1166+
following: ``<![CDATA[...]]>``
11631167
============================== ================================================= ==========================
11641168

1169+
.. versionadded:: 6.4
1170+
1171+
The `cdata_wrapping` option was introduced in Symfony 6.4.
1172+
11651173
Example with custom ``context``::
11661174

11671175
use Symfony\Component\Serializer\Encoder\XmlEncoder;
@@ -1881,3 +1889,4 @@ Learn more
18811889
.. _`data URI`: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
18821890
.. _seld/jsonlint: https://github.com/Seldaek/jsonlint
18831891
.. _$flags: https://www.php.net/manual/en/json.constants.php
1892+
.. _`a CDATA section`: https://en.wikipedia.org/wiki/CDATA

0 commit comments

Comments
 (0)