diff --git a/core/lib/Drupal/Component/Serialization/Yaml.php b/core/lib/Drupal/Component/Serialization/Yaml.php index 5b1d5c6..5792375 100644 --- a/core/lib/Drupal/Component/Serialization/Yaml.php +++ b/core/lib/Drupal/Component/Serialization/Yaml.php @@ -34,7 +34,7 @@ public static function decode($raw) { try { // If you have YAML data without a line break in it, like foo: bar then // that will be misinterpreted as a filename. - return Symfony::parse($raw . "\n", TRUE); + return Symfony::parse(rtrim($raw) . "\n", TRUE); } catch (\Exception $e) { throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);