mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
base64 filter: Added ability to specify encoding (#39714)
* base64 filter: Added ability to specify encoding * Added unicode chars for further testing * Removed errors to keep previous behaviour in place * Removed surrogate pairs due to issues loading YAML in CI
This commit is contained in:
parent
b5cffe8ced
commit
fc210a4584
4 changed files with 22 additions and 4 deletions
|
@ -935,6 +935,13 @@ To work with Base64 encoded strings::
|
|||
{{ encoded | b64decode }}
|
||||
{{ decoded | b64encode }}
|
||||
|
||||
As of version 2.6, you can define the type of encoding to use, the default is ``utf-8``::
|
||||
|
||||
{{ encoded | b64decode(encoding='utf-16-le') }}
|
||||
{{ decoded | b64encode(encoding='utf-16-le') }}
|
||||
|
||||
.. versionadded:: 2.6
|
||||
|
||||
To create a UUID from a string (new in version 1.9)::
|
||||
|
||||
{{ hostname | to_uuid }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue