6.0.0-alpha10
5/14/25

[#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 (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

History
09/24/2010 10:21:12 PM Jan Schneider Version ⇒ Git master
 
02/08/2009 10:07:45 AM Jan Schneider Assigned to Mike Naberezny
State ⇒ Assigned
 
02/08/2009 04:19:09 AM mpb (dot) mail (at) gmail (dot) com Comment #1
Priority ⇒ 2. Medium
New Attachment: horde_yaml.php Download
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde's Yaml parser chokes on legal tabs.
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
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

         )



)



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





?>


Saved Queries