8000 Merge pull request #1236 from iambrosi/issue1211 · symfony/symfony-docs@b62ceca · GitHub
[go: up one dir, main page]

Skip to content

Commit b62ceca

Browse files
committed
Merge pull request #1236 from iambrosi/issue1211
Added note for escaping '%' signs. Closes #1211
2 parents cd1cff1 + aae5041 commit b62ceca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

book/service_container.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ The end result is exactly the same as before - the difference is only in
222222
to look for parameters with those names. When the container is built, it
223223
looks up the value of each parameter and uses it in the service definition.
224224

225+
.. note::
226+
227+
The percent sign inside a parameter or argument, as part of the string, must
228+
be escaped with another percent sign::
229+
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>
230+
225231
The purpose of parameters is to feed information into services. Of course
226232
there was nothing wrong with defining the service without using any parameters.
227233
Parameters, however, have several advantages:

0 commit comments

Comments
 (0)
0