25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Allow XML to be visible in web browser in Common Test page

This commit is contained in:
Badlop 2023-02-22 15:20:22 +01:00
parent 37676757e3
commit 5cd6c524ea

View File

@ -547,10 +547,11 @@ decode_stream_element(NS, El) ->
decode(El, NS, []).
format_element(El) ->
case erlang:function_exported(ct, log, 5) of
Bin = case erlang:function_exported(ct, log, 5) of
true -> ejabberd_web_admin:pretty_print_xml(El);
false -> io_lib:format("~p~n", [El])
end.
end,
binary:replace(Bin, <<"<">>, <<"&lt;">>, [global]).
decode(El, NS, Opts) ->
try