diff options
author | Badlop <badlop@process-one.net> | 2019-12-16 10:38:53 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2019-12-16 11:35:10 +0100 |
commit | 869826c8186882c5344a36c77429ac6c50e80a03 (patch) | |
tree | ece03207e4e25f389cc3c1245394994a009e5a23 /src | |
parent | Improve compatibility with CockroachDB (#3074) (diff) |
Fix mod_muc_log skipping non-Latin messages (thanks to Yandrey)(#3115)
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_muc_log.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mod_muc_log.erl b/src/mod_muc_log.erl index 08498869..b37f7cc7 100644 --- a/src/mod_muc_log.erl +++ b/src/mod_muc_log.erl @@ -440,12 +440,10 @@ add_message_to_log(Nick1, Message, RoomJID, Opts, {_, _, Microsecs} = Now, STimeUnique = io_lib:format("~ts.~w", [STime, Microsecs]), - catch fw(F, - list_to_binary( - io_lib:format("<a id=\"~ts\" name=\"~ts\" href=\"#~ts\" " + fw(F, io_lib:format("<a id=\"~ts\" name=\"~ts\" href=\"#~ts\" " "class=\"ts\">[~ts]</a> ", [STimeUnique, STimeUnique, STimeUnique, STime]) - ++ Text), + ++ Text, FileFormat), file:close(F), ok. @@ -529,7 +527,7 @@ fw(F, S, FileFormat) when is_atom(FileFormat) -> fw(F, S, [], FileFormat). fw(F, S, O, FileFormat) -> - S1 = (str:format(binary_to_list(S) ++ "~n", O)), + S1 = <<(str:format(S, O))/binary, "\n">>, S2 = case FileFormat of html -> S1; |