bug #21912 [Yaml] dump escape sequences when possible (xabbuh)
This PR was merged into the 3.2 branch.
Discussion
----------
[Yaml] dump escape sequences when possible
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Tests for them have been introduced in #21903 (in 2.7 and 2.8 this does not need to be fixed as those versions didn't dump the `!!binary` tag).
Commits
-------
997103d
[Yaml] dump escape sequences when possible
This commit is contained in:
commit
d3c55c51d6
@ -688,7 +688,7 @@ class Inline
|
||||
|
||||
private static function isBinaryString($value)
|
||||
{
|
||||
return !preg_match('//u', $value) || preg_match('/[^\x09-\x0d\x20-\xff]/', $value);
|
||||
return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user