aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2019-03-19 07:55:37 +0100
committerLars Thorsen <[email protected]>2019-03-19 14:35:06 +0100
commitb1c6356a9d3cd8d6e9767a4252eb0bcc1602664b (patch)
treef3c4600d536cd7982b13ed61ddc4d71b0e7dba16 /lib/xmerl
parenta4f71b669ad9ece1a4afa671601c7c72dc89f042 (diff)
downloadotp-b1c6356a9d3cd8d6e9767a4252eb0bcc1602664b.tar.gz
otp-b1c6356a9d3cd8d6e9767a4252eb0bcc1602664b.tar.bz2
otp-b1c6356a9d3cd8d6e9767a4252eb0bcc1602664b.zip
[xmerl] Replace character refs correctly in attributes
Diffstat (limited to 'lib/xmerl')
-rw-r--r--lib/xmerl/src/xmerl_scan.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl
index e543a5a11e..0b7f378c77 100644
--- a/lib/xmerl/src/xmerl_scan.erl
+++ b/lib/xmerl/src/xmerl_scan.erl
@@ -2410,14 +2410,14 @@ scan_att_chars("&" ++ T, S0, Delim, Acc, TmpAcc,AT,IsNorm) -> % Reference
true ->
scan_att_chars(T1,S1,Delim,[ExpRef|Acc],[ExpRef|TmpAcc],AT,IsNorm);
_ ->
- Ch = string_to_char_set(S#xmerl_scanner.encoding, ExpRef),
case T of
"#" ++ _ ->
%% normalization rules (sec 3.3.3) require that for
%% character references, the referenced character be
%% added directly to the normalized value
- scan_att_chars(T1, S1, Delim, Ch ++ Acc,TmpAcc, AT,IsNorm);
+ scan_att_chars(T1, S1, Delim, ExpRef ++ Acc,TmpAcc, AT,IsNorm);
_ ->
+ Ch = string_to_char_set(S#xmerl_scanner.encoding, ExpRef),
scan_att_chars(Ch ++ T1, S1, Delim, Acc,TmpAcc, AT,IsNorm)
end
end;