Skip to content

Commit f0a98ad

Browse files
author
AndoniLarz
committed
[FEATURE] Add option to Xml Encoder for cdata wrapping opt-out
1 parent 7169759 commit f0a98ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/serializer.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,10 @@ Option Description
12061206
``save_options`` XML saving `options with libxml`_ ``0``
12071207
``remove_empty_tags`` If set to true, removes all empty tags in the ``false``
12081208
generated XML
1209+
``enable_cdata_wrapping`` If set to false, will not wrap any value ``true``
1210+
containing one of the following characters (
1211+
``<``, ``>``, ``&``) in `a CDATA section`_ like
1212+
following : ``<![CDATA[...]]>``
12091213
============================== ================================================= ==========================
12101214

12111215
Example with custom ``context``::
@@ -1936,3 +1940,4 @@ Learn more
19361940
.. _`data URI`: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
19371941
.. _seld/jsonlint: https://github.com/Seldaek/jsonlint
19381942
.. _$flags: https://www.php.net/manual/en/json.constants.php
1943+
.. _`a CDATA section`: https://en.wikipedia.org/wiki/CDATA

0 commit comments

Comments
 (0)