diff options
Diffstat (limited to '')
-rw-r--r--source/html.c4
1 file changed, 4 insertions, 0 deletions
diff --git a/source/html.c b/source/html.c
index b6e62a6..d1e28f8 100644
--- a/source/html.c
+++ b/source/html.c
@@ -367,6 +367,10 @@ void html_header_arg_in_quotes(const char *txt)
esc = "\\n";
else if (c == '"')
esc = "\\\"";
+ // A header line carries no other control byte either, and a web
+ // server refuses the whole response over one.
+ else if (c < 0x20 || c == 0x7f)
+ esc = "?";
if (esc) {
html_raw(txt, p - txt);
html(esc);