diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 04767b9..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/mod_pottymouth/src/mod_pottymouth.erl b/mod_pottymouth/src/mod_pottymouth.erl index 8fa3e59..0e8bc6f 100644 --- a/mod_pottymouth/src/mod_pottymouth.erl +++ b/mod_pottymouth/src/mod_pottymouth.erl @@ -49,11 +49,11 @@ filterMessageText(MessageAttrs, MessageText) -> MessageWords = string:tokens(unicode:characters_to_list(MessageText, utf8), " "), MessageTerms = [{Lang, Word} || Word <- MessageWords], % we get back bytewise format terms (rather than utf8) - list_to_binary(string:join(filterWords(MessageTerms), " ")). + string:join(filterWords(MessageTerms), " "). filterMessageBodyElements([{xmlel, <<"body">>, BodyAttr, [{xmlcdata, MessageText}]} = _H|T], MessageElements) -> - FilteredMessageWords = filterMessageText(BodyAttr, binary:bin_to_list(MessageText)), + FilteredMessageWords = binary:list_to_bin(filterMessageText(BodyAttr, binary:bin_to_list(MessageText))), FilteredBody = {xmlel, <<"body">>, BodyAttr, [{xmlcdata, FilteredMessageWords}]}, filterMessageBodyElements(T, lists:append(MessageElements, [FilteredBody]));