summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/html.c b/html.c
index 6313e4c3..543caea3 100644
--- a/html.c
+++ b/html.c
@@ -315,6 +315,8 @@ html_strlen(const char *cp)
switch (mandoc_escape(&cp, &seq, &ssz)) {
case (ESCAPE_ERROR):
return(sz);
+ case (ESCAPE_UNICODE):
+ /* FALLTHROUGH */
case (ESCAPE_NUMBERED):
/* FALLTHROUGH */
case (ESCAPE_PREDEF):
@@ -373,6 +375,12 @@ print_encode(struct html *h, const char *p, int norecurse)
break;
switch (esc) {
+ case (ESCAPE_UNICODE):
+ /* Skip passed "u" header. */
+ c = mchars_num2uc(seq + 1, len - 1);
+ if ('\0' != c)
+ printf("&#x%x;", c);
+ break;
case (ESCAPE_NUMBERED):
c = mchars_num2char(seq, len);
if ('\0' != c)