ResXmlEncoders::encodeAsXmlValue() : fixes for style tags mixed up with spaces.

This commit is contained in:
Ryszard Wiśniewski 2011-05-14 13:17:59 +02:00
parent 549dc9e3f4
commit 679078d962

View File

@ -92,7 +92,6 @@ public final class ResXmlEncoders {
isInStyleTag = false;
startPos = out.length() + 1;
enclose = false;
wasSpace = true;
}
} else if (c == ' ') {
if (wasSpace) {
@ -114,7 +113,7 @@ public final class ResXmlEncoders {
break;
case '<':
isInStyleTag = true;
if (enclose || wasSpace) {
if (enclose) {
out.insert(startPos, '"').append('"');
}
break;
@ -129,7 +128,7 @@ public final class ResXmlEncoders {
}
if (enclose || wasSpace) {
out.insert(0, '"').append('"');
out.insert(startPos, '"').append('"');
}
return out.toString();