mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +01:00
escapes for XML the appended text
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2112 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
8264ebdfb5
commit
9a1e6f1308
1 changed files with 5 additions and 3 deletions
|
@ -52,6 +52,8 @@
|
||||||
|
|
||||||
package org.jivesoftware.smackx;
|
package org.jivesoftware.smackx;
|
||||||
|
|
||||||
|
import org.jivesoftware.smack.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An XHTMLText represents formatted text. This class also helps to build valid
|
* An XHTMLText represents formatted text. This class also helps to build valid
|
||||||
* XHTML tags.
|
* XHTML tags.
|
||||||
|
@ -69,9 +71,9 @@ public class XHTMLText {
|
||||||
* @param lang the language of the body
|
* @param lang the language of the body
|
||||||
*/
|
*/
|
||||||
public XHTMLText(String style, String lang) {
|
public XHTMLText(String style, String lang) {
|
||||||
appendOpenBodyTag(style, lang);
|
appendOpenBodyTag(style, lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that an anchor section begins.
|
* Appends a tag that indicates that an anchor section begins.
|
||||||
*
|
*
|
||||||
|
@ -442,7 +444,7 @@ public class XHTMLText {
|
||||||
* @param textToAppend the text to append
|
* @param textToAppend the text to append
|
||||||
*/
|
*/
|
||||||
public void append(String textToAppend) {
|
public void append(String textToAppend) {
|
||||||
text.append(textToAppend);
|
text.append(StringUtils.escapeForXML(textToAppend));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue