summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-05-18 20:54:27 +0100
committerAlastair Poole <netstar@gmail.com>2020-05-18 20:54:27 +0100
commit6b46fcea2a4e129679509de120027ec2d5c12c40 (patch)
treefcb6f19336fb8924ef8d99265d174b9e8556be1d
parent32ec3cc8222b5f3741cbfefd990d273a85bf2f9f (diff)
util: handle ampersand.
-rw-r--r--src/bin/ui/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/ui/util.c b/src/bin/ui/util.c
index 5289598..ec9ac30 100644
--- a/src/bin/ui/util.c
+++ b/src/bin/ui/util.c
@@ -25,6 +25,13 @@ _man2entry(const char *text)
25 memcpy(&str[i], "&gt;", 4); 25 memcpy(&str[i], "&gt;", 4);
26 i += 4; 26 i += 4;
27 } 27 }
28 else if (*p == '&')
29 {
30 tmp = realloc(str, (len += 5));
31 str = tmp;
32 memcpy(&str[i], "&amp;", 5);
33 i += 5;
34 }
28 else if (*p == '\t') 35 else if (*p == '\t')
29 { 36 {
30 tmp = realloc(str, (len += 8)); 37 tmp = realloc(str, (len += 8));