Meets #8419: [PDF Export] Internal error when entering wrong YAML

[``* `#8419`  [PDF Export] Internal error when entering wrong YAML``](https://www.openproject.org/work_packages/8419)
There are missing spaces: ``{{`` becomes ``{ {`` and for instance ``{name:`` becomes ``{ name:`` (Please check the other blocks too)