-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
Description
Symfony version(s) affected: 5.2.1
Description
When the Yaml dumper encounters an ideographic space, the whole string becomes unquoted.
How to reproduce
Here's a unit test to go in src/Symfony/Component/Yaml/Tests/DumperTest.php
.
public function testDumpIdeographicSpaces()
{
$this->assertSame("{ alone: ' ', within_string: 'a b', regular_space: 'a b' }", $this->dumper->dump([
'alone' => ' ',
'within_string' => 'a b',
'regular_space' => 'a b',
]));
}
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'{ alone: ' ', within_string: 'a b', regular_space: 'a b' }'
+'{ alone: , within_string: a b, regular_space: 'a b' }'
Thanks!