Return to html.c CVS log | Up to [cvsweb.bsd.lv] / mandoc |
version 1.191, 2015/10/13 22:59:54 | version 1.192, 2016/01/04 12:45:29 | ||
---|---|---|---|
|
|
||
bufcat_id(struct html *h, const char *src) | bufcat_id(struct html *h, const char *src) | ||
{ | { | ||
/* Cf. <http://www.w3.org/TR/html4/types.html#h-6.2>. */ | /* Cf. <http://www.w3.org/TR/html5/dom.html#the-id-attribute>. */ | ||
while ('\0' != *src) | for (; '\0' != *src; src++) | ||
bufcat_fmt(h, "%.2x", *src++); | bufncat(h, *src == ' ' ? "_" : src, 1); | ||
} | } |