pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anton Voloshin <a.voloshin@postgrespro.ru>
To: pgsql-docs <pgsql-docs@lists.postgresql.org>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Subject: nested <a> tags in glossary entries in html docs
Date: Fri, 12 Apr 2024 19:29:08 +0300
Message-ID: <03ac3556-d47a-4022-9ea8-a9219272ea43@postgrespro.ru> (raw)

Hello,

In REL_13_STABLE and above, generated HTML have a broken HTML: nested <a 
href="..."> tags for all links to glossary. Somehow, this results in 
duplicated <a> tags on the https://www.postgresql.org/docs/

Found by tab-navigating https://www.postgresql.org/docs/16/rowtypes.html
where we see (spacing added to avoid line wraps):
... create a <a class="glossterm"
href="glossary.html#GLOSSARY-DOMAIN"</a><a class="glossterm" 
href="glossary.html#GLOSSARY-DOMAIN"
title="Domain">domain</a> over the composite type ...

So, empty <a>, and then the real <a>. This resulted in stopping twice on 
the "domain" link (right before, and then on the
"domain" word itself) while tab-navigating.

If I am to "make html" docs from the source (in REL_13_STABLE..master), 
I see nested <a>'s instead:

create a <a class="glossterm" href="glossary.html#GLOSSARY-DOMAIN"><em
class="glossterm"><a class="glossterm" 
href="glossary.html#GLOSSARY-DOMAIN" title="Domain">domain</a></em></a> 
over the composite type

I guess docs are processed additionally before getting to
https://www.postgresql.org/docs/ (html sanitizer/beautifier?), in 
passing fixing nested <a>'s, but producing duplicated <a>'s instead.

It seems to affect all glossary links:
after "make html",
grep '</a></em></a>' doc/src/sgml/html/*.html
results in 254 to 329 matches (in versions 13 to master).

REL_12_STABLE is not affected: glossary was only introduced in 13.

It seems to have been introduced in

commit 347d2b07fcc250680f75b5f89ba49d4805782c6b
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date:   Fri Apr 3 19:23:20 2020

     Add a glossary to the documentation

Not sure about how to fix this (don't really know docbook).

-- 
Anton Voloshin
Postgres Professional, The Russian Postgres Company
https://postgrespro.ru





view thread (9+ messages)  latest in thread

Message-ID: <03ac3556-d47a-4022-9ea8-a9219272ea43@postgrespro.ru>
Permalink:  ../03ac3556-d47a-4022-9ea8-a9219272ea43@postgrespro.ru/
Also on:    postgresql.org/message-id/03ac3556-d47a-4022-9ea8-a9219272ea43@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: a.voloshin@postgrespro.ru, pgsql-docs@lists.postgresql.org, alvherre@alvh.no-ip.org
  Subject: Re: nested <a> tags in glossary entries in html docs
  In-Reply-To: <03ac3556-d47a-4022-9ea8-a9219272ea43@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox