From 3dce8e627236f7bb517f947e2a59a0d10318bbe9 Mon Sep 17 00:00:00 2001 From: Anja Date: Sat, 17 Mar 2018 12:29:06 +0100 Subject: [PATCH] [TASK] Escape reserved characters in yaml files In preparation to update the symfony/yaml dependency to v4, proper escaping needs to take place. Following http://symfony.com/doc/current/components/yaml/yaml_format.html#strings unsufficient escaping will result in a parse error. Change-Id: Ic6eb3c2825c8c877d292aaa21e4b0e1a9fee6fe4 Resolves: #84420 Releases: master Reviewed-on: https://review.typo3.org/56292 Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Tested-by: TYPO3com Reviewed-by: Jan Helke Tested-by: Jan Helke --- ...4420-ProperlyEscapeReservedCharsInYaml.rst | 22 +++++++++++++++++++ .../Loader/YamlFileLoaderTest.php | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Important-84420-ProperlyEscapeReservedCharsInYaml.rst diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-84420-ProperlyEscapeReservedCharsInYaml.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-84420-ProperlyEscapeReservedCharsInYaml.rst new file mode 100644 index 000000000000..764a4c3ca6e6 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Important-84420-ProperlyEscapeReservedCharsInYaml.rst @@ -0,0 +1,22 @@ +.. include:: ../../Includes.txt + +========================================================== +Important: #84420 - Properly escape reserved chars in yaml +========================================================== + +See :issue:`84420` + +Description +=========== + +If dealing with YAML files in the TYPO3 system - for instance to configure forms +using the `form` extension or if configuring `ckeditor` - integrators should properly +quote strings containing special characters like `@` or `%` to be upwards compatible +with the version 4 symfony yaml parser. + +More information can be found in the Symfony_ docs. + +.. _Symfony:: http://symfony.com/doc/current/components/yaml/yaml_format.html#strings + + +.. index:: Backend, Frontend, ext:form, ext:rte_ckeditor diff --git a/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php b/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php index 783e7d9cda1f..b5f508d49be1 100644 --- a/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php +++ b/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php @@ -106,7 +106,7 @@ public function loadWithPlacholders() options: - option1 - option2 -betterthanbefore: %firstset.myinitialversion% +betterthanbefore: \'%firstset.myinitialversion%\' '; $expected = [