X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/35c319dedab41299e8ad1ec62697c36315fb88da..fd04a2530af452252677a5bf5b97f05788e91ba6:/html.c?ds=sidebyside diff --git a/html.c b/html.c index d734f546..adff053c 100644 --- a/html.c +++ b/html.c @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.191 2015/10/13 22:59:54 schwarze Exp $ */ +/* $Id: html.c,v 1.192 2016/01/04 12:45:29 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -720,8 +720,8 @@ void bufcat_id(struct html *h, const char *src) { - /* Cf. . */ + /* Cf. . */ - while ('\0' != *src) - bufcat_fmt(h, "%.2x", *src++); + for (; '\0' != *src; src++) + bufncat(h, *src == ' ' ? "_" : src, 1); }