Return to html.c CVS log | Up to [local] / src / usr.bin / mandoc |
version 1.61, 2015/10/13 22:57:49 | version 1.62, 2015/12/25 20:43:04 | ||
---|---|---|---|
|
|
||
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); | ||
} | } |