mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 22:11:07 +01:00
Improve StringUtils.escapeForXml()
This commit is contained in:
parent
f2a748db9a
commit
e6a9027cc6
11 changed files with 169 additions and 43 deletions
|
|
@ -332,7 +332,7 @@ public class StreamInitiation extends IQ {
|
|||
.append(getNamespace()).append("\" ");
|
||||
|
||||
if (getName() != null) {
|
||||
buffer.append("name=\"").append(StringUtils.escapeForXML(getName())).append("\" ");
|
||||
buffer.append("name=\"").append(StringUtils.escapeForXmlAttribute(getName())).append("\" ");
|
||||
}
|
||||
|
||||
if (getSize() > 0) {
|
||||
|
|
@ -350,7 +350,7 @@ public class StreamInitiation extends IQ {
|
|||
if ((desc != null && desc.length() > 0) || isRanged) {
|
||||
buffer.append('>');
|
||||
if (getDesc() != null && desc.length() > 0) {
|
||||
buffer.append("<desc>").append(StringUtils.escapeForXML(getDesc())).append("</desc>");
|
||||
buffer.append("<desc>").append(StringUtils.escapeForXmlText(getDesc())).append("</desc>");
|
||||
}
|
||||
if (isRanged()) {
|
||||
buffer.append("<range/>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue