File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1199,8 +1199,16 @@ Option Description
1199
1199
``save_options `` XML saving `options with libxml `_ ``0 ``
1200
1200
``remove_empty_tags `` If set to true, removes all empty tags in the ``false ``
1201
1201
generated XML
1202
+ ``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[...]]> ``
1202
1206
============================== ================================================= ==========================
1203
1207
1208
+ .. versionadded :: 6.4
1209
+
1210
+ The `cdata_wrapping ` option was introduced in Symfony 6.4.
1211
+
1204
1212
Example with custom ``context ``::
1205
1213
1206
1214
use Symfony\Component\Serializer\Encoder\XmlEncoder;
@@ -1920,3 +1928,4 @@ Learn more
1920
1928
.. _`data URI` : https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
1921
1929
.. _seld/jsonlint : https://github.com/Seldaek/jsonlint
1922
1930
.. _$flags : https://www.php.net/manual/en/json.constants.php
1931
+ .. _`a CDATA section` : https://en.wikipedia.org/wiki/CDATA
You can’t perform that action at this time.
0 commit comments