Optional filters
base64_decode
<string> | base64_decode
Decode a base64 encoded string. The decoded value is assumed to be UTF-8 and will be decoded as UTF-8.
Warning
While Python Liquid assumes UTF-8 character encoding, Ruby Liquid does not seem to do so, potentially introducing byte strings into the render context.
If the input value is not a valid base64 encoded string, an exception will be raised.
base64_encode
<string> | base64_encode
Encode a string using base64.
Note
Python Liquid returns a str
from base64_encode
, not bytes
.
If the input value is not a string, it will be converted to a string before base64 encoding.
base64_url_safe_decode
<string> | base64_url_safe_decode
Decode a URL safe base64 encoded string. Substitutes -
instead of +
and _
instead of /
in
the standard base64 alphabet. The decoded value is assumed to be UTF-8 and will be decoded as UTF-8.
Warning
While Python Liquid assumes UTF-8 character encoding, Ruby Liquid does not seem to do so, potentially introducing byte strings into the render context.
If the input value is not a valid base64 encoded string, an exception will be raised.
base64_url_safe_encode
<string> | base64_url_safe_encode
Encode a string using URL safe base64. Substitutes -
instead of +
and _
instead of /
in
the standard base64 alphabet.
Note
Python Liquid returns a str
from base64_url_safe_encode
, not bytes
.
If the input value is not a string, it will be converted to a string before base64 encoding.