From d8a9c97f235d93da59a3987fa7d78eb6fe7bac1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Tue, 23 Mar 2010 21:15:19 +0100 Subject: [PATCH] AXmlResourceParser.getAttributeValue(): escaping string values. --- src/brut/androlib/res/decoder/AXmlResourceParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/brut/androlib/res/decoder/AXmlResourceParser.java b/src/brut/androlib/res/decoder/AXmlResourceParser.java index f61fbb0b..8f50db79 100644 --- a/src/brut/androlib/res/decoder/AXmlResourceParser.java +++ b/src/brut/androlib/res/decoder/AXmlResourceParser.java @@ -23,6 +23,7 @@ import java.io.Reader; import org.xmlpull.v1.XmlPullParserException; import android.util.TypedValue; import brut.androlib.AndrolibException; +import brut.androlib.res.AndrolibResources; import brut.util.ExtDataInput; import com.mindprod.ledatastream.LEDataInputStream; import java.util.logging.Level; @@ -300,7 +301,8 @@ public class AXmlResourceParser implements XmlResourceParser { int valueType = m_attributes[offset + ATTRIBUTE_IX_VALUE_TYPE]; if (valueType == TypedValue.TYPE_STRING) { int valueString = m_attributes[offset + ATTRIBUTE_IX_VALUE_STRING]; - return m_strings.getString(valueString); + return AndrolibResources.escapeForResXml( + m_strings.getString(valueString)); } int valueData = m_attributes[offset + ATTRIBUTE_IX_VALUE_DATA];