Browse Source

Fix escapejs return type

Tomasz Kowal 11 years ago
parent
commit
321a869155
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/erlydtl_filters.erl

+ 1 - 1
src/erlydtl_filters.erl

@@ -296,7 +296,7 @@ divisibleby(Input, Divisor) when is_integer(Input), is_integer(Divisor) ->
 
 %% @doc Escapes characters for use in JavaScript strings.
 escapejs(Input) when is_binary(Input) ->
-    escapejs(unicode:characters_to_list(Input));
+    unicode:characters_to_binary(escapejs(unicode:characters_to_list(Input)));
 escapejs(Input) when is_list(Input) ->
     escapejs(Input, []).