Page MenuHomePhabricator

Double apostrophe in links rendered as italics when there are more than ~1000 links after the link in question
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The link to https://en.wikipedia.org/wiki/2,2%27,2%27%27-Nitrilotriacetonitrile gets rendered as 2,2',2-Nitrilotriacetonitrile (the apostrophes get interpreted as italics), but only when there are 1000 links after that link. Note that the link still works despite being rendered differently. No redirect appears to exist at https://en.wikipedia.org/wiki/2,2%27,2-Nitrilotriacetonitrile.

If the link uses ' instead of an apostrophe, this problem doesn't occur.

Also note that adding useparsoid=1 makes the link render without italics:

What should have happened instead?:
It would be preferable if rendering behavior would be consistent regardless of how many links come after the link in question, similar to using useparsoid=1.

Other information (browser name/version, screenshots, etc.):

Capostrophe.png (546×920 px, 55 KB)

This caused a problem on https://en.wikipedia.org/wiki/Glossary_of_chemical_formulae, see on-wiki discussion.

Event Timeline

This comment was removed by AlexisJazz.
AlexisJazz renamed this task from Double apostrophe in links rendered as italics when there are more than ~1000 links to Double apostrophe in links rendered as italics when there are more than ~1000 links after the link in question.Sep 3 2025, 7:21 PM
MSantos subscribed.

Removing Parsoid since it's applying the right behaviour.

If the Parsoid behavior is correct, I'm inclined to resolve this as 'Declined' since the legacy parser is already being deprecated. Parsoid is expected to be the default within a year.

If the Parsoid behavior is correct, I'm inclined to resolve this as 'Declined' since the legacy parser is already being deprecated. Parsoid is expected to be the default within a year.

There's another difference between the parsers: the actual link.

MediaWiki parser:

https://en.wikipedia.org/wiki/2,2%27,2%27%27-Nitrilotriacetonitrile

Parsoid:

https://en.wikipedia.org/wiki/2,2',2''-Nitrilotriacetonitrile

Are the apostrophes not getting URL-encoded in Parsoid on purpose? My train of thought being that URL-encoding the apostrophes in Parsoid might introduce the same problem there somehow.

Parsoid generally follows the HTML5 spec closely w/r/t valid URL characters, and as far as I know these characters are not required to be URL escaped. Most non-English wikis greatly prefer a minimal set of URL-encoded characters, since URL encoding can make titles with non-ascii characters extremely hard to read.

If the Parsoid behavior is correct, I'm inclined to resolve this as 'Declined' since the legacy parser is already being deprecated. Parsoid is expected to be the default within a year.

I'd prefer to leave it open until Parsoid is actually deployed. Timelines tend to slip, and finding closed bugs is a lot harder than finding open ones.