Symfony: How to escape hash # character in yaml

advertisement

Just a quick note for myself to escape # character in yaml – Symfony. When i’m trying to load batch data, some of the record seems not imported successfully especially with hash # character. By default, all the string behind the hash # character is treated as comment.

Here’s the example to escape hash # character:-

test.yml
testrow:
   subject: "how to escape hash # character"

Just add a double quote for your string and the hash # character will be able to escape.

Tags: , , , ,


Posted at August 6th, 2008 by chua

If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)


Leave a Reply