From 9a1e6f1308264c66d6c1bf19f3254502bcb4a9b6 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sun, 28 Sep 2003 03:13:45 +0000 Subject: [PATCH] escapes for XML the appended text git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2112 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smackx/XHTMLText.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smackx/XHTMLText.java b/source/org/jivesoftware/smackx/XHTMLText.java index 68eceac69..b16184202 100644 --- a/source/org/jivesoftware/smackx/XHTMLText.java +++ b/source/org/jivesoftware/smackx/XHTMLText.java @@ -52,6 +52,8 @@ package org.jivesoftware.smackx; +import org.jivesoftware.smack.util.StringUtils; + /** * An XHTMLText represents formatted text. This class also helps to build valid * XHTML tags. @@ -69,9 +71,9 @@ public class XHTMLText { * @param lang the language of the body */ public XHTMLText(String style, String lang) { - appendOpenBodyTag(style, lang); + appendOpenBodyTag(style, lang); } - + /** * Appends a tag that indicates that an anchor section begins. * @@ -442,7 +444,7 @@ public class XHTMLText { * @param textToAppend the text to append */ public void append(String textToAppend) { - text.append(textToAppend); + text.append(StringUtils.escapeForXML(textToAppend)); } /**