diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-14 15:56:37 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-14 15:56:37 +0000 |
commit | 0a3fdda2fdfc6e87b86c158cca5f54f59f302ddf (patch) | |
tree | b405cd6693754ece2bc987508959029c657bd6c0 /html.c | |
parent | 6743059f021b4239f933715e225da9a692cf92ff (diff) | |
download | mandoc-0a3fdda2fdfc6e87b86c158cca5f54f59f302ddf.tar.gz |
print HTML character references as 4+ digits hexadecimal, like Unicode;
from bentley@, tweaked by me
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -453,7 +453,7 @@ print_encode(struct html *h, const char *p, const char *pend, int norecurse) (c > 0x7E && c < 0xA0)) c = 0xFFFD; if (c > 0x7E) { - (void)snprintf(numbuf, sizeof(numbuf), "&#%d;", c); + (void)snprintf(numbuf, sizeof(numbuf), "&#x%.4X;", c); print_word(h, numbuf); } else if (print_escape(h, c) == 0) print_byte(h, c); @@ -516,7 +516,7 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...) print_indent(h); else if ((h->flags & HTML_NOSPACE) == 0) { if (h->flags & HTML_KEEP) - print_word(h, " "); + print_word(h, " "); else { if (h->flags & HTML_PREKEEP) h->flags |= HTML_KEEP; @@ -779,7 +779,7 @@ print_text(struct html *h, const char *word) h->flags |= HTML_KEEP; print_endword(h); } else - print_word(h, " "); + print_word(h, " "); } assert(NULL == h->metaf); |