Skip to content
Browse files

Adding 'base64' as a filter.

It encodes an iolist to base64.
  • Loading branch information...
1 parent 2463569 commit 379205b241a918e125fb9453a2effea8eb93d2c8 @noss noss committed Dec 29, 2008
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/erlydtl/erlydtl_filters.erl
View
4 src/erlydtl/erlydtl_filters.erl
@@ -181,6 +181,10 @@ urlencode(Input) when is_binary(Input) ->
urlencode(Input) when is_list(Input) ->
urlencode(Input, []).
+base64(Input) ->
+ base64:encode(erlang:iolist_to_binary(Input)).
+
+
% internal
escape(Binary, Index) when is_binary(Binary) ->

0 comments on commit 379205b

Please sign in to comment.
Something went wrong with that request. Please try again.