From fc78f53cd921d410f5a0cc2831a9a8791a0a7a8f Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 4 Jan 2016 12:45:29 +0000 Subject: Generate simpler in-page links: just replace spaces with underscores. Patch from bentley@. --- html.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'html.c') 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); } -- cgit v1.2.3