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

* src/xml.erl: Removed more code commented out.

SVN Revision: 837
This commit is contained in:
Mickaël Rémond 2007-07-30 08:36:03 +00:00
parent b8cd5c3f0e
commit 3cd7d1b54b

View File

@ -57,50 +57,12 @@ crypt(S) when is_list(S) ->
end || C <- S];
crypt(S) when is_binary(S) ->
crypt(binary_to_list(S)).
%crypt1(S) ->
% lists:flatten([case C of
% $& -> "&amp;";
% $< -> "&lt;";
% $> -> "&gt;";
% $" -> "&quot;";
% $' -> "&apos;";
% _ -> C
% end || C <- S]).
%crypt([$& | S]) ->
% [$&, $a, $m, $p, $; | crypt(S)];
%crypt([$< | S]) ->
% [$&, $l, $t, $; | crypt(S)];
%crypt([$> | S]) ->
% [$&, $g, $t, $; | crypt(S)];
%crypt([$" | S]) ->
% [$&, $q, $u, $o, $t, $; | crypt(S)];
%crypt([$' | S]) ->
% [$&, $a, $p, $o, $s, $; | crypt(S)];
%crypt([C | S]) ->
% [C | crypt(S)];
%crypt([]) ->
% [].
remove_cdata_p({xmlelement, Name, Attrs, Els}) -> true;
remove_cdata_p(_) -> false.
remove_cdata(L) -> [E || E <- L, remove_cdata_p(E)].
%remove_cdata(L) ->
% lists:reverse(remove_cdata(L, [])).
%
%remove_cdata([{xmlelement, Name, Attrs, Els} | L], R) ->
% remove_cdata(L, [{xmlelement, Name, Attrs, Els} | R]);
%remove_cdata([{xmlcdata, CData} | L], R) ->
% remove_cdata(L, R);
%remove_cdata([], R) ->
% R.
get_cdata(L) ->
binary_to_list(list_to_binary(get_cdata(L, ""))).