Skip to content

Commit 9437594

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

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
@@ -1130,6 +1130,10 @@ Option Description
11301130
``save_options`` XML saving `options with libxml`_ ``0``
11311131
``remove_empty_tags`` If set to true, removes all empty tags in the ``false``
11321132
generated XML
1133+
``enable_cdata_wrapping`` If set to false, will not wrap any value ``true``
1134+
containing one of the following characters (
1135+
``<``, ``>``, ``&``) in `a CDATA section`_ like
1136+
following : ``<![CDATA[...]]>``
11331137
============================== ================================================= ==========================
11341138

11351139
Example with custom ``context``::
@@ -1827,3 +1831,4 @@ Learn more
18271831
.. _`RFC 4122`: https://tools.ietf.org/html/rfc4122
18281832
.. _`PHP reflection`: https://php.net/manual/en/book.reflection.php
18291833
.. _`data URI`: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
1834+
.. _`a CDATA section`: https://en.wikipedia.org/wiki/CDATA

0 commit comments

Comments
 (0)