Fixed #2142 XML Export - string values containing only spaces

Fixed AS3 - Nullpointer in MethodBody when no ABC set
This commit is contained in:
Jindra Petřík
2023-12-10 18:22:04 +01:00
parent 2596650ed3
commit 7c2e41b1a9
4 changed files with 17 additions and 4 deletions

View File

@@ -1321,6 +1321,14 @@ public class Helper {
}
public static String escapeXmlExportString(String s) {
if (s.matches("^ +$")) {
StringBuilder ret = new StringBuilder(s.length());
for (int i = 0; i < s.length(); i++) {
ret.append("\\u0020");
}
return ret.toString();
}
StringBuilder ret = new StringBuilder(s.length());
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);