Release notes URL linking bug (links a trailing parenthesis)


(Gleb Mazovetskiy) #1

When posting release notes for a new version of my add-on, I’ve noticed that a URL is auto-linked incorrectly:

Screenshot:
addons-mozilla-relnotes

Release notes text:

Compatibility with extensions that override tab size in Firefox.

The previous update did not fix the issue in Firefox, because Firefox tab-size is still -moz- prefixed (https://bugzilla.mozilla.org/show_bug.cgi?id=737785).

Notice that Discourse links the URL correctly, but addons.mozilla.org considers the ) a part of the URL (making it an invalid URL per RFC 3986).

Example pages where this shows up:


(Martin Giger) #2

That is because parenthesis are valid parts of URIs. To avoid this you can use a html link (<a href="https://bugzilla.mozilla.org/show_big.cgi?id=737785">bug 737785</a>)


(Gleb Mazovetskiy) #3

You’re right, it is a reserved character but is explicitly allowed in segment (via sub-delims), confirmation below.

Section 3.3:

If a URI contains an authority component, then the path component
must either be empty or begin with a slash ("/") character.
path-abempty  = *( "/" segment )
path-absolute = "/" [ segment-nz *( "/" segment ) ]
segment       = *pchar
segment-nz    = 1*pchar
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

Section 2.3:

unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

Section 2.2:

sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
              / "*" / "+" / "," / ";" / "="

(Jorge) #4

Please file an issue and we’ll look into it. But, as pointed out, there are workarounds for it.