We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 487e918 commit fb9d377Copy full SHA for fb9d377
routing/slash_in_parameter.rst
@@ -77,6 +77,15 @@ a more permissive regular expression for it:
77
78
That's it! Now, the ``{token}`` parameter can contain the ``/`` character.
79
80
+.. note::
81
+
82
+ If the route includes the special ``{_format}`` placeholder, you shouldn't
83
+ use the ``.+`` requirement for the parameters that allow slashes. For example,
84
+ if the pattern is ``/share/{token}.{_format}`` and ``{token}`` allows any
85
+ character, the ``/share/foo/bar.json`` URL will consider ``foo/bar.json``
86
+ as the token and the format will be empty. This can be solved replacing the
87
+ ``.+`` requirement by ``[^.]+`` to allow any character except dots.
88
89
.. note::
90
91
If the route defines several placeholders and you apply this permissive
0 commit comments