25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Handle multiple < and > in mod_muc_log plaintext mode (EJAB-1640)

This commit is contained in:
Badlop 2013-05-31 13:23:08 +02:00
parent 3025bfd3ff
commit d1e1191793

View File

@ -978,8 +978,8 @@ htmlize(S1, FileFormat) ->
%% true means 'apply nofollow on links'. %% true means 'apply nofollow on links'.
htmlize(S0, _NoFollow, plaintext) -> htmlize(S0, _NoFollow, plaintext) ->
S1 = ejabberd_regexp:greplace(S0, <<"~">>, ?PLAINTEXT_CO), S1 = ejabberd_regexp:greplace(S0, <<"~">>, ?PLAINTEXT_CO),
S1x = ejabberd_regexp:replace(S1, <<"<">>, ?PLAINTEXT_IN), S1x = ejabberd_regexp:greplace(S1, <<"<">>, ?PLAINTEXT_IN),
ejabberd_regexp:replace(S1x, <<">">>, ?PLAINTEXT_OUT); ejabberd_regexp:greplace(S1x, <<">">>, ?PLAINTEXT_OUT);
htmlize(S1, NoFollow, _FileFormat) -> htmlize(S1, NoFollow, _FileFormat) ->
S2_list = str:tokens(S1, <<"\n">>), S2_list = str:tokens(S1, <<"\n">>),
lists:foldl(fun (Si, Res) -> lists:foldl(fun (Si, Res) ->