mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-31 15:21:38 +01:00
Show binaries as strings in WebAdmin; handle tab characters.
This commit is contained in:
parent
56e7affdfd
commit
df921fef40
@ -1070,15 +1070,17 @@ pretty_sentence([Char | A], R) ->
|
||||
pretty_sentence(A, [Char | R]).
|
||||
|
||||
pretty_binary([$>, $> | A], "") ->
|
||||
{A, ">>" ++ "<<"};
|
||||
{A, "\"\""};
|
||||
pretty_binary([$>, $> | A], R) ->
|
||||
{A, ">>" ++ io_lib:format("~p", [lists:reverse(R)]) ++ "<<"};
|
||||
{A, io_lib:format("~p", [lists:reverse(R)])};
|
||||
pretty_binary([$, | A], R) ->
|
||||
pretty_binary(A, R);
|
||||
pretty_binary([32 | A], R) ->
|
||||
pretty_binary(A, R);
|
||||
pretty_binary([$\n | A], R) ->
|
||||
pretty_binary(A, R);
|
||||
pretty_binary([$\t | A], R) ->
|
||||
pretty_binary(A, R);
|
||||
pretty_binary([Digit1, Digit2, Other | A], R) when (Other == $>) or (Other == $,) ->
|
||||
Integer = list_to_integer([Digit1, Digit2]),
|
||||
pretty_binary([Other | A], [Integer | R]);
|
||||
|
Loading…
Reference in New Issue
Block a user