Summary | Horde's Yaml parser chokes on legal tabs. |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Assigned |
Priority | 2. Medium |
Owners | mike (at) naberezny (dot) com |
Requester | mpb.mail (at) gmail (dot) com |
Created | 02/08/2009 (5939 days ago) |
Due | |
Updated | 09/24/2010 (5346 days ago) |
Assigned | 02/08/2009 (5939 days ago) |
Resolved | |
Milestone | |
Patch | No |
State ⇒ Assigned
Priority ⇒ 2. Medium
New Attachment: horde_yaml.php
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde's Yaml parser chokes on legal tabs.
Type ⇒ Bug
State ⇒ Unconfirmed
chokes on legal (non-indentation) tabs in Yaml content. The snippet
is also attached to this ticket.
Spyc and Syck have the same bug. (sfYaml does not, but it has other bugs.)
Thanks!
<?php
$yaml0 = "- [ one, two ]\n"; // separated by 2 tabs
$yaml1 = "- [ one, two ]\n"; // separated by 2 spaces
require_once ("Horde/Yaml.php");
require_once ("Horde/Yaml/Dumper.php");
require_once ("Horde/Yaml/Exception.php");
require_once ("Horde/Yaml/Loader.php");
require_once ("Horde/Yaml/Node.php");
print_r (Horde_Yaml::load ($yaml0));
print_r (Horde_Yaml::load ($yaml1));
/*
----------------------------------------------------------------------------
I expect identical output, but I get this:
Array
(
[0] => Array
(
[0] => one, two
)
)
Array
(
[0] => Array
(
[0] => one
[1] => two
)
)
----------------------------------------------------------------------------
*/
?>