From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 4d302225 for ; Tue, 29 Aug 2017 10:56:31 -0500 (EST) Received: by mail-qk0-f180.google.com with SMTP id k126so16973433qkb.4 for ; Tue, 29 Aug 2017 08:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xfwFAm1e13/ly2TbYom4idY5/eYMH1dRl/E0pfQPhVQ=; b=dx/O89WvY+MZsFxZElnV+l/W7R54Bp9zaSKFqx6hB/WUdEP1+XR+mH2eCjfmiZVW2q xPBAsHfCpkjtU80cMcefZO8505TEXiBjMxh1dV5MosVZFIzVkw5awWlJvMtALLXmeBpW M+wdIx4+p8faRbzpP/Q2tezKYyFibJKtLf4/8AV2L9Yi5jtcKJ1U8ZK8XtoH2vW6cfQ6 0JaxGIm6qxB65cbYxTSQs9wN2fy86Y3l5I4HStyAQCiPkZLV9+d/fWP8PhT2tCErjio9 KUOUjFlIRNpZ61LhycIKNGa7atcbErJ451B6HPqM+yz9ZV0RpL/ca2CnvFl+dCCUQuRo QDsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xfwFAm1e13/ly2TbYom4idY5/eYMH1dRl/E0pfQPhVQ=; b=qKqYM3L6XQZx2lv619vgUIHkaiEZgxi3YqKtFeh93k7qStG6kKH1c9cB8tKQ/zP7Uq F3Yo7kuGHD5sYEMs6yHb2RVxUapev30w50XUc/m9Kxu5eqKcLycYELsdutCXgmxFaSPz FIl5JnaVGGtzCwLsP4hBf8f+XgtWDyDbxZVPFER16nX6acxinHvQzrfRvt6zWE4A5TcG sCUgr5uAr1yYwcSDxiWvuGzTsZuU60wPx1j76PGk1fZFerbPH3L8x9XhI4fDTcySmfRn GLyUanhUzExyi233G36zenu7eKmym9bg3lMJ8468c21hdffu4sgRaOsFn/bSlJUajfks +HIg== X-Gm-Message-State: AHYfb5iG7RMJ5HCEK3kuxGMWNK4r6DoOevhaxVyuxDAlchVjz+S/Vq5s 1VpTOzx0dit0ZNes1eBwJ5nNmVu0c00MdiE= X-Received: by 10.55.121.130 with SMTP id u124mr6581952qkc.13.1504022187879; Tue, 29 Aug 2017 08:56:27 -0700 (PDT) X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Received: by 10.140.81.147 with HTTP; Tue, 29 Aug 2017 08:56:27 -0700 (PDT) In-Reply-To: <17497.1503996432@cathet.us> References: <17497.1503996432@cathet.us> From: Jackson Pauls Date: Tue, 29 Aug 2017 16:56:27 +0100 Message-ID: Subject: Re: mandoc HTML output: minor issues To: discuss@mandoc.bsd.lv Content-Type: text/plain; charset="UTF-8" Hi Anthony, On 29 August 2017 at 09:47, Anthony J. Bentley wrote: >> 4. Running v.Nu (https://validator.github.io/validator/) on a >> collection of HTML files generated by mandoc picks up duplicate IDs, >> and a bunch of other issues: >> * unescaped characters in href attributes (%, "), >> * unescaped characters in URL fragments (\, {, }, #, ^, [, ], <, |), >> *
s appearing inside
s, and
>> * mismatches between column count in  and table rows.
>> I can gather a bunch of examples if of interest.
>
> Please do. mandoc(1) could use some improvement when it comes to
> producing valid HTML.

Ok, here goes:


Example of unescaped % in sudo.8:
 403 .It Li %H
becomes
375       [...][...]
should be



Example of wrongly escaped double quote in sshd.8:
475 .It Cm command="command"
becomes
337   [...][...]
should be



Example of unescaped space character in URL path in sudoers.5:
3378 For more information see
3379 .Xr "GROUP PROVIDER PLUGINS" .
becomes
2305     For more information see GROUP PROVIDER PLUGINS.
the href should be "/1/GROUP%20PROVIDER%20PLUGINS"


Example of unescaped { and } characters in fragment in visudo.8:
347 .It Li Warning: unused {User,Runas,Host,Cmnd}_Alias
becomes
242 [...][...]
should be


There are other issues with unescaped characters in URL fragments,
which can only contain a limited set of characters:
https://stackoverflow.com/a/26119120


Example of a 
inside a
 (cause by a missing 
) in rpld.conf.5: 96 .Bd -literal -ffset indent 97 foo = something; 98 or 99 .Bd -literal -ffset indent 100 bar; 101 102 .Ed becomes 52
53
 54         foo = something;
 55 or
 56
 57 
58
59
 60         bar;
 61
 62 
63
Maybe that's just an issue with the manual (missing .Ed), but maybe on hitting the second .Bd mandoc(1) could assume an .Ed for the prior .Bd. Example of column count issue in tmux.1: 475 .Bl -column "XXXXXXXXXX" "X" 476 .It Sy "Token" Ta Sy "" Ta Sy "Meaning" becomes 372 373 374 375 376 377 378 379 380 381 v.Nu says "error: A table row was 3 columns wide and exceeded the column count established using column markup (2)," but in practice I'm not sure how important this is. Finally, one bonus oddity I just noticed, an opening paren "(" going stray in dnstop.8: 165 .It * 166 show sources + 8th level query names 167 .It ( 168 show sources + 9th level query names becomes 178
*
179
show sources + 8th level query names
180 ( 181
182
show sources + 9th level query names
Cheers, Jackson www.mankier.com -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv
TokenMeaning