Package: docbook-xsl
Version: 1.79.2+dfsg-2
Severity: normal

The ostree package has man pages written in Docbook XML and processed into
man pages via docbook.xsl. The one that has this bug is
man/ostree-admin-config-diff.xml, which contains:

    <refmeta>
        <refentrytitle>ostree admin config-diff</refentrytitle>
        <manvolnum>1</manvolnum>
    </refmeta>

I would expect this to be truncated into something like

.TH "OSTREE ADMIN CONFIG\-" "1" "" "OSTree" "ostree admin config-diff"

or

.TH "OSTREE ADMIN CONFIG" "1" "" "OSTree" "ostree admin config-diff"

which would render in man(1) like this:

> OSTREE ADMIN CONFIG(1)      ostree admin config-diff    OSTREE ADMIN CONFIG(1)
> ... [content of man page here] ...
> OSTree                                                  OSTREE ADMIN CONFIG(1)

However, it actually it comes out as

.TH "OSTREE ADMIN CONFIG\" "1" "" "OSTree" "ostree admin config-diff"

which has the effect of escaping the second double quote in the line,
resulting in parts of the header having an unintended interpretation:

> OSTREE ADMIN CONFIG()                                    OSTREE ADMIN CONFIG()
> ... [content of man page here] ...
>                                                          OSTREE ADMIN CONFIG()

I suspect that what has happened here is that the U+002D HYPHEN/MINUS in
the refentrytitle was escaped as \- before the title was truncated to fit
man page conventions, whereas it should have been truncated first and then
escaped second.

This is similar to #821235, in which single quotes are replaced by
\*(Aq before upper-casing, whereas the correct processing would have
probably been to upper-case first and then replace single quotes with
mixed-case \*(Aq afterwards.

    smcv

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-security'), (500, 
'oldstable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages docbook-xsl depends on:
ii  xml-core  0.18+nmu1

Versions of packages docbook-xsl recommends:
ii  docbook-xml  4.5-12

Versions of packages docbook-xsl suggests:
pn  dbtoepub                                <none>
ii  docbook-xsl-doc-html [docbook-xsl-doc]  1.79.1-1
pn  docbook-xsl-saxon                       <none>
pn  fop                                     <none>
pn  libsaxon-java                           <none>
ii  libxalan2-java                          2.7.2-4
pn  libxslthl-java                          <none>
pn  xalan                                   <none>

-- no debconf information

Reply via email to