From 37756bb69b45c6e10a934e8b40cab0cb8e614fab Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 23 Nov 2018 19:17:05 +0000 Subject: When a font escape appears in the middle of a string, make sure it doesn't cause output of bogus whitespace. Fixing a bug reported by Pali dot Rohar at gmail dot com. --- html.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index 6d984717..715d0dd1 100644 --- a/html.c +++ b/html.c @@ -416,8 +416,11 @@ print_encode(struct html *h, const char *p, const char *pend, int norecurse) case ESCAPE_FONTBI: case ESCAPE_FONTCW: case ESCAPE_FONTROMAN: - if (0 == norecurse) + if (0 == norecurse) { + h->flags |= HTML_NOSPACE; print_metaf(h, esc); + h->flags &= ~HTML_NOSPACE; + } continue; case ESCAPE_SKIPCHAR: h->flags |= HTML_SKIPCHAR; -- cgit