8000 Added note for escaping '%' signs · web-dev/symfony-docs@aae5041 · GitHub
[go: up one dir, main page]

Skip to content

Commit aae5041

Browse files
committed
Added note for escaping '%' signs
1 parent ae17f1f commit aae5041

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