6.0.0-git
2018-12-15

[#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 2009-02-08 (3597 days ago)
Due
Updated 2010-09-24 (3004 days ago)
Assigned 2009-02-08 (3597 days ago)
Resolved
Milestone
Patch No

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