rfc2html icon indicating copy to clipboard operation
rfc2html copied to clipboard

Hyperlink generation failure

Open JayDaley opened this issue 2 years ago • 3 comments

See section 3.2.3 of https://datatracker.ietf.org/doc/html/rfc5741 where there is a generated link for an unlinkable URL (as the URL contains an pseudocode parameter) but the linked text is only part of the usable URL (see where the </a> is placed).

The HTML is

  &quot;Information about the current status of this document, any
  errata, and how to provide feedback on it may be obtained at
  <a href="http://www.rfc-editor">http://www.rfc-editor</a>.org/info/rfc&lt;rfc-no&gt;.&quot;

which appears onscreen as

"Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc<rfc-no>."

JayDaley avatar Nov 03 '22 09:11 JayDaley

cc @larseggert

rjsparks avatar Nov 06 '22 12:11 rjsparks

https://sandbox-htmlize.ietf.org/doc/html/rfc5741#section-3-2-2 has the same issue, because that document has no proper HTML available. So it won't be fixed in the future either.

We could try and tweak the regexes, but given that there is no test suite I am afraid it will cause breakage elsewhere.

larseggert avatar Nov 06 '22 14:11 larseggert

I understand that the following may be a regex issue, so I'm adding it to #30. I've tried and failed to read CONTRIBUTING.md - it's a blank page in my browser and it didn't come with a git checkout so I gave up. Please feel free to update/move/delete/admonish as required.

If there's no test suite, in my naïvety I imagine that it wouldn't be impossible for me to come up with something to test any changes to the regexes, even if all it did was compare the output from the new regexes with that from the old. A shell script employing wget and diff ought to do it. Observations?

8<--------------------------------------------------------------------------------------

RFC1112 has two appendices, Appendix I and Appendix II.

First error:

In the document, the first reference to one of these appendices is in section 4 "Host Group Addresses" and is a reference to Appendix II.

In the HTML version at for example

https://datatracker.ietf.org/doc/html/rfc1112

there is an HTML link in the section 4 reference:

[quote] Appendix II contains some background discussion of several issues related to host group addresses. [/quote]

The link is incorrectly formed, as should be obvious. The second 'I' in the Roman numeral 'II' is wrongly placed outside the anchor tag and the link refers to 'appendix-I' instead of 'appendix-II'.

Second and third errors:

There are no targets at the two appendices, thus clicking on the existing links, whether correct or not, does nothing anyway...

GWHAYWOOD avatar Sep 16 '23 09:09 GWHAYWOOD