Bug 332198 change nsGenericDOMDataNode::ToCString

r=sicking sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@196133 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2006-05-07 01:39:21 +00:00
parent cab708d237
commit 5af87489fc

View File

@@ -599,6 +599,12 @@ nsGenericDOMDataNode::ToCString(nsAString& aBuf, PRInt32 aOffset,
aBuf.AppendLiteral("\\n");
} else if (ch == '\t') {
aBuf.AppendLiteral("\\t");
} else if (ch == '&') {
aBuf.AppendLiteral("&");
} else if (ch == '<') {
aBuf.AppendLiteral("&lt;");
} else if (ch == '>') {
aBuf.AppendLiteral("&gt;");
} else if ((ch < ' ') || (ch >= 127)) {
char buf[10];
PR_snprintf(buf, sizeof(buf), "\\u%04x", ch);
@@ -619,6 +625,12 @@ nsGenericDOMDataNode::ToCString(nsAString& aBuf, PRInt32 aOffset,
aBuf.AppendLiteral("\\n");
} else if (ch == '\t') {
aBuf.AppendLiteral("\\t");
} else if (ch == '&') {
aBuf.AppendLiteral("&amp;");
} else if (ch == '<') {
aBuf.AppendLiteral("&lt;");
} else if (ch == '>') {
aBuf.AppendLiteral("&gt;");
} else if ((ch < ' ') || (ch >= 127)) {
char buf[10];
PR_snprintf(buf, sizeof(buf), "\\u%04x", ch);