diff --git a/core/lib/Drupal/Component/Serialization/Yaml.php b/core/lib/Drupal/Component/Serialization/Yaml.php index 7d0f0c5..5b1d5c6 100644 --- a/core/lib/Drupal/Component/Serialization/Yaml.php +++ b/core/lib/Drupal/Component/Serialization/Yaml.php @@ -32,7 +32,9 @@ public static function encode($data) { */ public static function decode($raw) { try { - return Symfony::parse($raw, TRUE); + // 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); } catch (\Exception $e) { throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);