XML Escaping: Don't need to escape unprintable chars.

Should not be needed because the attribute encoding="utf-8" is there.

closes #10445
This commit is contained in:
Martin Mathieson 2020-10-19 22:26:18 +01:00 committed by Wireshark GitLab Utility
parent d86df72da3
commit 89e96c1e77
1 changed files with 1 additions and 6 deletions

View File

@ -1774,12 +1774,7 @@ print_escaped_xml(FILE *fh, const char *unescaped_string)
offset += 6;
break;
default:
if (g_ascii_isprint(*p)) {
temp_buffer[offset++] = *p;
}
else {
offset += g_snprintf(&temp_buffer[offset], ESCAPED_BUFFER_MAX-offset, "\\x%x", (guint8)*p);
}
temp_buffer[offset++] = *p;
}
if (offset > ESCAPED_BUFFER_MAX-8) {
/* Getting close to end of buffer so flush to fh */