From 89e96c1e77a39a259cafb488c6057e6c123d692b Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Mon, 19 Oct 2020 22:26:18 +0100 Subject: [PATCH] XML Escaping: Don't need to escape unprintable chars. Should not be needed because the attribute encoding="utf-8" is there. closes #10445 --- epan/print.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/epan/print.c b/epan/print.c index 5dca80c188..e3f1b28481 100644 --- a/epan/print.c +++ b/epan/print.c @@ -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 */