#948969 malformed URI in the wnpp pages produces "Tidy validation failed" messages

#948969#5
Date:
2020-01-15 11:56:26 UTC
From:
To:
Dear all
When the website builds */devel/wnpp folder, there is a RFH bug that generates a
malformed URI, and thus producing several "Tidy validation failed" messages each
day, of the type:

*** /srv/www.debian.org/www/devel/wnpp/help_requested.sv.html
line 182 column 136 - Warning: <a> escaping malformed URI reference

The HTML code generated by the english/devel/wnpp/wnpp.pl script is like this one:
---
 <li><a href="https://bugs.debian.org/945468">pgq, pgqd, pgq-node, python-pgq,
python-skytools, londiste: Queuing for PostgreSQL</a>, (<a
href="https://packages.debian.org/src:pgq, pgqd, pgq-node, python-pgq,
python-skytools, londiste">package info</a>),
requested 50 days ago.
---

Such info is extracted from the RFH bug report #945468, with subject:

RFH: pgq, pgqd, pgq-node, python-pgq, python-skytools, londiste -- Queuing for
PostgreSQL

I guess the issue is that the 'name' of the package extracted from the bug
contains blanks and semicolons.

I'm not sure how to solve this. Things that come to mind:
1.- asking the maintainer to file a RFH bug per package.
2.- somebody to improve wnpp.pl script to take care about these things (sorry, I
have no spoons/skills for that).
3.- Any other idea?

For now, I'm filing this bug report so the issue is registered and we can point
translators/web team members to this info if they ask about the Tidy validation
failed messages.

Kind regards,

#948969#10
Date:
2020-02-17 17:39:45 UTC
From:
To:
Hi,

Laura Arjona Reina <larjona@debian.org> wrote:

Exclude devel/wnpp from tidy processing for now?


Holger

#948969#15
Date:
2020-02-23 09:30:22 UTC
From:
To:
Hi,

Holger Wansing <hwansing@mailbox.org> wrote:

Any objection?


Holger

#948969#20
Date:
2020-02-23 09:50:58 UTC
From:
To:
Hi

El 23 de febrero de 2020 10:30:22 CET, Holger Wansing <hwansing@mailbox.org> escribió:
Not from my part. I was trying to find the time to look at how to add such exclusion but couldn't, so if it's clear for you, please go ahead.

Just mention this bug report as a comment near the exclusion code for the future.

Thanks!

#948969#25
Date:
2020-02-23 11:47:18 UTC
From:
To:
Hi,

Laura Arjona Reina <larjona@debian.org> wrote:

I assume this can be done via including the path in 'excl= ' in 999Xtidy:

https://salsa.debian.org/webmaster-team/cron/commit/52d03afabbc84e19091eb53bd83b62d1965438ab
and
https://salsa.debian.org/webmaster-team/cron/commit/1e9758ec93a8303a36a7de799b248c517c703dc7


Holger

#948969#30
Date:
2020-04-01 06:23:21 UTC
From:
To:
in wnpp.pl,
L107
    push @rfa_bypackage_html, " <pdolink \"$pkg\" />, ";
L122
        push @rfa_bymaint_html, " <pdolink \"$pkg\" />, ";
L136
    push @rfa_byage_html, " <pdolink \"$pkg\" />, ";
L148
    push @orphaned_html, " <pdolink \"$pkg\" />, ";
L160
    push @orphaned_byage_html, " <pdolink \"$pkg\" />";
L174
         " <pdolink \"$pkg\" />, ";
L191
         " <pdolink \"$pkg\" />, ";
L207
         " <pdolink \"$pkg\" />, ";
L286
         " <pdolink \"$rfh_pkg{$_}\" />, ";
L302
         " <pdolink \"$rfh_pkg{$_}\" />, ";
L314
	" <pdolink \"$rfh_pkg{$_}\" />, <popcon \"$popcon{$rfh_pkg{$_}}\" />, ";

these <pdolink ..../> need to be 1 by 1 as pdo site does not accept multiple stanza;;
I suggest most clear way, adding a sub routine named "pdolinks"
and replace these <pdolink> tags w/ a snippet refering this, like:
  &pdolinks($pkg);
---
# this sub routine takes 1 arg, expects "pkg1, pkg2, ..." form
# and returns a scalar: "<pdolink "pkg1" />[, <pdolink "pkg2" />, ...]
# additional description for noob:
# 1st line: $packages takes the 1st arg
# 2nd line: @packages takes indivisual packages for each element
# 3rd-6th lines: cleanup and <pdolink>'ifies every element in @packages
# 8th line: join concatenates array using specified separator as the 1st arg
# if it returns an array, the @..._html arrays will contain every links 1 by 1
sub pdolinks{
  my $packages = shift;
  my @packages = split(/[\s,]+/, $packages);
  for (my $i=0; $i<$#packages; $i++){
    $packages[$i] =~ s/[\s,]//g;
    $packages[$i] = "<pdolink \"$packages[$i]\" />":
  }
  return join(", ", @packages);
}
---

note that I did no test;
additionally, popcon links may have the same issue

#948969#35
Date:
2020-12-30 12:42:21 UTC
From:
To:
hi Laura,

I've cherry-picked this as 6ffd214be07576841d2409865733011635e61cb5 into
the master branch and am wondering if this issue, #948969, is fixed now
and should be closed?

#948969#38
Date:
2020-12-30 12:42:21 UTC
From:
To:
hi Laura,

I've cherry-picked this as 6ffd214be07576841d2409865733011635e61cb5 into
the master branch and am wondering if this issue, #948969, is fixed now
and should be closed?