]> granicus.if.org Git - ejabberd/commitdiff
Handle multiple < and > in mod_muc_log plaintext mode (EJAB-1640)
authorBadlop <badlop@process-one.net>
Fri, 31 May 2013 11:21:16 +0000 (13:21 +0200)
committerBadlop <badlop@process-one.net>
Fri, 31 May 2013 11:21:37 +0000 (13:21 +0200)
src/mod_muc/mod_muc_log.erl

index e66355891b3d5677e1e3206122dc38c4da0778fe..e4b355924f99ed15281c39de043fe8a5bb123531 100644 (file)
@@ -796,9 +796,9 @@ htmlize(S1, FileFormat) ->
 %% The NoFollow parameter tell if the spam prevention should be applied to the link found
 %% true means 'apply nofollow on links'.
 htmlize(S0, _NoFollow, plaintext) ->
-    S1 = ejabberd_regexp:greplace(S0, "~", ?PLAINTEXT_CO),
-    S1x = ejabberd_regexp:replace(S1, "<", ?PLAINTEXT_IN),
-    ejabberd_regexp:replace(S1x, ">", ?PLAINTEXT_OUT);
+    S1  = ejabberd_regexp:greplace(S0, "~", ?PLAINTEXT_CO),
+    S1x = ejabberd_regexp:greplace(S1, "<", ?PLAINTEXT_IN),
+    ejabberd_regexp:greplace(S1x, ">", ?PLAINTEXT_OUT);
 htmlize(S1, NoFollow, _FileFormat) ->
     S2_list = string:tokens(S1, "\n"),
     lists:foldl(