Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Norbert Klasen
JLDAP
Commits
d042fa04
Commit
d042fa04
authored
Apr 30, 2004
by
Sunil Kumar
Browse files
Fix Bug DSMLWriter did not support pre-defined entities in XML (<, > ). (ITS#3102).
parent
0df870c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
com/novell/ldap/util/DSMLWriter.java
View file @
d042fa04
...
...
@@ -152,6 +152,14 @@ public class DSMLWriter implements LDAPWriter {
out
.
write
(
"</searchResponse>"
);
newLine
(
0
);
out
.
write
(
"</batchResponse>"
);
break
;
case
NEW_BATCH:
//if no message is send, we assume
//batch response.
out
.
write
(
"<batchResponse>"
);
newLine
(
0
);
out
.
write
(
"</batchResponse>"
);
break
;
}
newLine
(
0
);
out
.
flush
();
...
...
@@ -1272,7 +1280,13 @@ public class DSMLWriter implements LDAPWriter {
newLine
(
4
);
if
(
Base64
.
isValidUTF8
(
bytevalues
[
i
],
false
)){
out
.
write
(
"<value>"
);
out
.
write
(
values
[
i
]);
String
xmlvalue
=
values
[
i
];
xmlvalue
=
xmlvalue
.
replaceAll
(
"&"
,
"&"
);
xmlvalue
=
xmlvalue
.
replaceAll
(
"<"
,
"<"
);
xmlvalue
=
xmlvalue
.
replaceAll
(
">"
,
">"
);
xmlvalue
=
xmlvalue
.
replaceAll
(
"'"
,
"&apos"
);
xmlvalue
=
xmlvalue
.
replaceAll
(
"\""
,
"""
);
out
.
write
(
xmlvalue
);
out
.
write
(
"</value>"
);
}
else
{
out
.
write
(
"<value xsi:type=\"xsd:base64Binary\">"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment