mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
commit
b6a1ed06b8
2 changed files with 4 additions and 4 deletions
|
@ -3836,11 +3836,11 @@ def replace(name,
|
|||
|
||||
If you need to match a literal string that contains regex special
|
||||
characters, you may want to use salt's custom Jinja filter,
|
||||
``escape_regex``.
|
||||
``regex_escape``.
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{{ 'http://example.com?foo=bar%20baz' | escape_regex }}
|
||||
{{ 'http://example.com?foo=bar%20baz' | regex_escape }}
|
||||
|
||||
repl
|
||||
The replacement text
|
||||
|
|
|
@ -637,11 +637,11 @@ class SerializerExtension(Extension, object):
|
|||
|
||||
.. code-block:: jinja
|
||||
|
||||
escape_regex = {{ 'https://example.com?foo=bar%20baz' | escape_regex }}
|
||||
regex_escape = {{ 'https://example.com?foo=bar%20baz' | regex_escape }}
|
||||
|
||||
will be rendered as::
|
||||
|
||||
escape_regex = https\\:\\/\\/example\\.com\\?foo\\=bar\\%20baz
|
||||
regex_escape = https\\:\\/\\/example\\.com\\?foo\\=bar\\%20baz
|
||||
|
||||
** Set Theory Filters **
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue