mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user