getkirby-v2 / toolkit

This is the deprecated toolkit for Kirby v2.
http://getkirby.com
81 stars 50 forks source link

Invalid YAML encoding #252

Closed florianpircher closed 7 years ago

florianpircher commented 7 years ago

yaml::encode does not always return valid YAML.

Minimal example:

$data = array('username' => '@example');
$yaml = yaml::encode($data);

// $yaml = "username: @example\n"

YAML reference on Invalid use of Reserved Indicators.

Zegnat commented 7 years ago

IIRC Kirby is using YAML 1.0 which is pretty silent on this invalid use.

florianpircher commented 7 years ago

Thanks for the info! I discovered this behavior while developing a plugin and could not trace it back to anything. I will close this issue, because within the context of YAML 1.0 this is not an issue anymore.