mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01:00
Prevents double escaping of special chars in arrays.xml/<item> tags
This commit is contained in:
parent
1449c00f76
commit
f93a312308
1
CHANGES
1
CHANGES
@ -9,6 +9,7 @@ v2.0.0 (TBA)
|
||||
-Fixed (issue #439) - Correctly handles apk's that have have the general access bit enabled for encryption.
|
||||
-Fixed (issue #339) - Re-enables debug mode ( -d flag) to fix smali debugging. (Thanks Ryszard)
|
||||
-Fixed (issue #177) - Adapted output of smali to make breakpoint setting easier in different IDEs. (Thanks Ryszard)
|
||||
-Fixed (issue #391) - Fixes characters (& and <) from being double escaped in <item>'s of arrays.xml
|
||||
|
||||
v1.5.3 (TBA)
|
||||
-Updated to smali/baksmali to v1.4.2
|
||||
|
@ -58,7 +58,7 @@ public class ResArrayValue extends ResBagValue implements
|
||||
serializer.attribute(null, "name", res.getResSpec().getName());
|
||||
for (int i = 0; i < mItems.length; i++) {
|
||||
serializer.startTag(null, "item");
|
||||
serializer.text(mItems[i].encodeAsResXmlItemValue());
|
||||
serializer.text(mItems[i].encodeAsResXmlNonEscapedItemValue());
|
||||
serializer.endTag(null, "item");
|
||||
}
|
||||
serializer.endTag(null, type);
|
||||
|
@ -57,6 +57,10 @@ public abstract class ResScalarValue extends ResValue implements
|
||||
return encodeAsResXmlValueExt().replace("@android:", "@*android:");
|
||||
}
|
||||
|
||||
public String encodeAsResXmlNonEscapedItemValue() throws AndrolibException {
|
||||
return encodeAsResXmlValue().replace("@android:", "@*android:").replace("&", "&").replace("<","<");
|
||||
}
|
||||
|
||||
public String encodeAsResXmlValueExt() throws AndrolibException {
|
||||
String rawValue = mRawValue;
|
||||
if (rawValue != null) {
|
||||
|
@ -5,6 +5,8 @@
|
||||
<item>TEST2</item>
|
||||
<item>TEST3</item>
|
||||
<item>%2$s foo %1$d</item>
|
||||
<item>http://google.com&boo=1&foo=2</item>
|
||||
<item><b>Bolded Text</b></item>
|
||||
</string-array>
|
||||
<integer-array name="test_array2">
|
||||
<item>-1</item>
|
||||
|
Loading…
Reference in New Issue
Block a user