[#7963] Horde's Yaml parser chokes on legal tabs.
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@naberezny.com
Requester mpb.mail@gmail.com
Created 2009-02-08 (3812 days ago)
Due
Updated 2010-09-24 (3219 days ago)
Assigned 2009-02-08 (3812 days ago)
Resolved
Milestone
Patch No

Comments
mpb.mail@gmail.com 2009-02-08 04:19:09
The following code snipped demonstrates that Horde's Yaml parser 
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

         )



)



---------------------------------------------------------------------------- 
*/





?>