maplefu0602 / spyc

Automatically exported from code.google.com/p/spyc
MIT License
0 stars 0 forks source link

Spyc::YAMLDump() generated unsuitable document #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Spyc::YAMLDump() generate unsuitable document as YAML when the array
contained string likes '&foo'.
2. For example 

---
some: &foo

What is the expected output? What do you see instead?
Should be quoted by '.
For instance at the example above.

---
some: '&foo'

What version of the product are you using? On what operating system?
0.4.5

Please provide any additional information below.
I evaded temporary with this way.

--- spyc.php : 303 ---
Add the condition 
 strpos($value,"&") !== false ||

Original issue reported on code.google.com by cat.s.pa...@gmail.com on 1 Dec 2009 at 8:03

GoogleCodeExporter commented 8 years ago
Thanks, it's fixed in the latest SVN version.

Original comment by vlad.and...@gmail.com on 31 May 2010 at 10:43