diff options
author | 2018-12-03 16:17:58 +0000 | |
---|---|---|
committer | 2018-12-03 16:17:58 +0000 | |
commit | 3c7cc499bcacf2ed9ec9d4def037c8f852fa81a0 (patch) | |
tree | 3a3d1f5f8852115b340cc673d15fce5af24727d3 | |
parent | Do not process the top 32 bits of the 64 bit interrupt mask register (diff) | |
download | wireguard-openbsd-3c7cc499bcacf2ed9ec9d4def037c8f852fa81a0.tar.xz wireguard-openbsd-3c7cc499bcacf2ed9ec9d4def037c8f852fa81a0.zip |
Render .br as <br/>, not as an empty <div>.
The element <br/> was already employed for many other purposes,
so there is nothing wrong with using it.
Also, it is safer because <br/> is permitted in phrasing content,
whereas <div> is only allowed in flow content.
This is the first part of the HTML syntax audit which i wanted
to do for a long time. Reminded by a loosely related bug report
from Mark Harris <mark dot hsj at gmail dot com>.
Examples of where this caused HTML nesting syntax errors:
* in man(7) code between .nf and .fi
* in mdoc(7) code between .Bd -unfilled and .Ed
* in mdoc(7) code between .Ql Xo and .Xc
* in mdoc(7) code between .Rs and .Re
-rw-r--r-- | usr.bin/mandoc/roff_html.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/mandoc/roff_html.c b/usr.bin/mandoc/roff_html.c index 6dbf6f7337a..8d57de5b3b9 100644 --- a/usr.bin/mandoc/roff_html.c +++ b/usr.bin/mandoc/roff_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff_html.c,v 1.12 2018/06/25 14:53:54 schwarze Exp $ */ +/* $OpenBSD: roff_html.c,v 1.13 2018/12/03 16:17:58 schwarze Exp $ */ /* * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -58,11 +58,7 @@ roff_html_pre(struct html *h, const struct roff_node *n) static void roff_html_pre_br(ROFF_HTML_ARGS) { - struct tag *t; - - t = print_otag(h, TAG_DIV, ""); - print_text(h, "\\~"); /* So the div isn't empty. */ - print_tagq(h, t); + print_otag(h, TAG_BR, ""); } static void |