[Tickets #7963] Horde's Yaml parser chokes on legal tabs.
    bugs at horde.org 
    bugs at horde.org
       
    Sun Feb  8 04:19:09 UTC 2009
    
    
  
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7963
------------------------------------------------------------------------------
  Ticket             | 7963
  Created By         | mpb.mail at gmail.com
  Summary            | Horde's Yaml parser chokes on legal tabs.
  Queue              | Horde Framework Packages
  Version            | FRAMEWORK_3
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
+New Attachment     | horde_yaml.php
------------------------------------------------------------------------------
mpb.mail at gmail.com (2009-02-07 23:19) wrote:
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
         )
)
----------------------------------------------------------------------------  
*/
?>
    
    
More information about the bugs
mailing list