Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Escape "%" in parameters.yml symfony2

Tags:

yaml

symfony

I would like escape a character % in file : parameters.yml, because my password begin by %

database_driver3: pdo_sqlsrv
database_host3: 192.168.10.10
database_port3: 1455
database_name3: MyDB
database_user3: sa
database_password3: %ABC$Admin_2012%

What I really should be doing ?

like image 243
Zouhair Avatar asked Dec 03 '14 14:12

Zouhair


1 Answers

The easiest way is to simply add quotes to the values you want to escape

database_password3: "%ABC$Admin_2012%"

OR by using double % credit - skowron-line

database_password3: %%ABC$Admin_2012%%
like image 191
Mantas Avatar answered Oct 07 '22 21:10

Mantas