-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Base 64 encode and decode filters #763
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Just a couple missing snippets that I see
) | ||
}, | ||
snippets = { | ||
@JinjavaSnippet(code = "{% set my_number = -53 %}\n" + "{{ my_number|abs }}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you copied this over from AbsFilter
- should probably update it to use b64decode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, thanks for catching this!
) | ||
}, | ||
snippets = { | ||
@JinjavaSnippet(code = "{% set my_number = -53 %}\n" + "{{ my_number|abs }}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update this to use b64encode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding!
Adds 2 new filters:
b64encode
b64decode
Each of them default to using UTF-8, but you can specify the charset as one of:
(If running on a machine that supports more charsets, you can use one of those too).
These filters are both supported in ansible
For #743