summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-10-11 21:59:49 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-10-11 21:59:49 +0000
commite2eaefa07e10e367efa2500d67f0ec9d6e53711b (patch)
tree9555716917c159d1b0c620af310a913f0d59eb33 /usr.bin/mandoc
parentcc37f860fa9522b2d74100c4b3356d5c981efc7e (diff)
Drop tags containing a blank character:
They don't work, they break other tags in weird ways, and even if they could be made to work, they would be mostly useless. Issue reported by naddy@, thanks.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/tag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/tag.c b/usr.bin/mandoc/tag.c
index 3b22b4e77b9..3c97d06963c 100644
--- a/usr.bin/mandoc/tag.c
+++ b/usr.bin/mandoc/tag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tag.c,v 1.8 2015/10/06 18:30:44 schwarze Exp $ */
+/* $OpenBSD: tag.c,v 1.9 2015/10/11 21:59:48 schwarze Exp $ */
/*
* Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -119,7 +119,7 @@ tag_put(const char *s, int prio, size_t line)
size_t len;
unsigned int slot;
- if (tag_files.tfd <= 0)
+ if (tag_files.tfd <= 0 || strchr(s, ' ') != NULL)
return;
slot = ohash_qlookup(&tag_data, s);
entry = ohash_find(&tag_data, slot);