Browse Source

Make escapejs work with 'line separator' 8232 and 'paragraph separator' 8233

Tomasz Kowal 11 years ago
parent
commit
5f77ccc783
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(binary_to_list(Input));
+    escapejs(unicode:characters_to_list(Input));
 escapejs(Input) when is_list(Input) ->
     escapejs(Input, []).