YaML: escape exclamation marks to avoid issues with compliant parsers

and added some support for reading such escaped characters.
This commit is contained in:
Raphael Coeffic
2021-11-28 11:31:47 +10:00
committed by Peter Feerick
parent 1103a3c842
commit 66932626d5
4 changed files with 16 additions and 2 deletions
@@ -763,7 +763,7 @@ static bool w_swtchSrc(const YamlNode* node, uint32_t val, yaml_writer_func wf,
{
int32_t sval = yaml_to_signed(val, node->size);
if (sval < 0) {
wf(opaque, "!", 1);
wf(opaque, "\\!", 2);
sval = abs(sval);
}