mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
* src/xml_stream.erl: Group CDATA on a single xmlcdata node (splitting is not relevant as dependant on TCP/IP packet fragmentation) (EJAB-292).
SVN Revision: 839
This commit is contained in:
parent
3f51e73944
commit
e9bbed2299
@ -1,5 +1,9 @@
|
||||
2007-07-30 Mickael Remond <mickael.remond@process-one.net>
|
||||
|
||||
* src/xml_stream.erl: Group CDATA on a single xmlcdata
|
||||
node (splitting is not relevant as dependant on TCP/IP packet
|
||||
fragmentation) (EJAB-292).
|
||||
|
||||
* src/xml.erl: Remove compilation warnings (EJAB-290).
|
||||
|
||||
* src/xml.erl: Do not crypt binary CData, but enclose the value in
|
||||
|
@ -59,6 +59,15 @@ process_data(CallbackPid, Stack, Data) ->
|
||||
case Stack of
|
||||
[El] ->
|
||||
[El];
|
||||
%% Merge CDATA nodes if they are contiguous
|
||||
%% This does not change the semantic: the split in
|
||||
%% several CDATA nodes depends on the TCP/IP packet
|
||||
%% fragmentation
|
||||
[{xmlelement, Name, Attrs,
|
||||
[{xmlcdata, PreviousCData}|Els]} | Tail] ->
|
||||
[{xmlelement, Name, Attrs,
|
||||
[{xmlcdata, concat_binary([PreviousCData, CData])} | Els]} | Tail];
|
||||
%% No previous CDATA
|
||||
[{xmlelement, Name, Attrs, Els} | Tail] ->
|
||||
[{xmlelement, Name, Attrs, [{xmlcdata, CData} | Els]} |
|
||||
Tail];
|
||||
|
Loading…
Reference in New Issue
Block a user