aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src/xmerl_scan.erl
diff options
context:
space:
mode:
authorJimmy Zöger <[email protected]>2017-03-08 14:56:06 +0100
committerJimmy Zöger <[email protected]>2017-03-08 14:56:06 +0100
commit027c94a04a3c78daa351b025c68694f01c566560 (patch)
tree8c8cbb7a25fc1f059e74d42a1fee5cdc797a3ac9 /lib/xmerl/src/xmerl_scan.erl
parentca34a6c16a146cb5780a9c28cb5614e2e846d318 (diff)
downloadotp-027c94a04a3c78daa351b025c68694f01c566560.tar.gz
otp-027c94a04a3c78daa351b025c68694f01c566560.tar.bz2
otp-027c94a04a3c78daa351b025c68694f01c566560.zip
Improves accumulator fun in xmerl_scan so that only one #xmlText record is returned for strings which have character references
* Adds test with character reference in numeric form * Updates test for ticket_7430
Diffstat (limited to 'lib/xmerl/src/xmerl_scan.erl')
-rw-r--r--lib/xmerl/src/xmerl_scan.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl
index 4eacb9fc4d..18fe7031b9 100644
--- a/lib/xmerl/src/xmerl_scan.erl
+++ b/lib/xmerl/src/xmerl_scan.erl
@@ -474,6 +474,8 @@ event(_X, S) ->
%% into multiple objects (in which case {Acc',Pos',S'} should be returned.)
%% If {Acc',S'} is returned, Pos will be incremented by 1 by default.
%% Below is an example of an acceptable operation
+acc(#xmlText{value = Text}, [X = #xmlText{value = AccText}], S) ->
+ {[X#xmlText{value = AccText ++ Text}], S};
acc(X, Acc, S) ->
{[X|Acc], S}.