Page MenuHomePhabricator

Investigate what to do with WikiLinkFixer now that Parsoid supports red links
Open, Needs TriagePublic

Description

Verify Parsoid link support works for us, then see if we can remove WikiLinkFixer.

We might need to start tracking HTML versions, since old HTML still needs to be fixed. Also, we need to request https://www.mediawiki.org/wiki/Specs/HTML/1.5.0 or later (currently 1.2.1).

For the relative path issue, we could start using BaseHrefFixer for all content.

Related Objects

StatusSubtypeAssignedTask
OpenFeatureNone
ResolvedJdlrobson
OpenNone
ResolvedArlolra
ResolvedEsanders
ResolvedCatrope
DeclinedNone
DeclinedNone
Resolvedssastry
Resolved bearND
Resolved bearND
Resolved bearND
Resolved bearND
OpenNone
Resolved Jhernandez
OpenNone
Resolved marcoil
ResolvedCatrope
Resolved marcoil
ResolvedArlolra
ResolvedArlolra
Resolved GWicke
Resolved GWicke
Resolved GWicke
Resolvedfgiunchedi
Resolvedfgiunchedi
Resolved Cmjohnson
Resolved Cmjohnson
ResolvedJoe
Resolvedfgiunchedi
Resolved GWicke
Resolved Jdouglas
Resolved GWicke
Resolved GWicke
ResolvedArlolra
Resolved GWicke
Resolved mobrovac
Resolved mobrovac
Resolved mobrovac
Resolved mobrovac
Duplicate Jdouglas
ResolvedAndrew
Resolved GWicke
Resolvedfgiunchedi
Resolvedfgiunchedi
Resolvedfgiunchedi
ResolvedEevans
Resolvedfgiunchedi
Resolved GWicke
Resolved GWicke
Resolvedfgiunchedi
Resolved mobrovac
Resolved GWicke
Resolved GWicke
Resolved AlexMonk-WMF
Resolved santhosh
Resolvedssastry
Resolved Mholloway
ResolvedJackmcbarn
ResolvedRenxiaoyi
Resolvedcscott
ResolvedKelson
OpenNone
OpenNone
OpenNone
ResolvedArlolra
ResolvedArlolra
OpenNone
DeclinedNone
OpenNone
OpenNone
DeclinedNone
DeclinedNone
DeclinedNone
OpenNone
OpenNone
InvalidNone
InvalidNone
DuplicateNone
DuplicateNone
Resolved Jhernandez
ResolvedJdlrobson
DuplicatePeter
Resolved bmansurov
DeclinedNone
DuplicateNone
Resolved nray
Resolvedphuedx
ResolvedAnomie
ResolvedAnomie
ResolvedAnomie
ResolvedEBernhardson
ResolvedAnomie
ResolvedAnomie
OpenNone
DuplicateNone
ResolvedNone
Resolvedphuedx
DeclinedNone
Resolved Pchelolo
ResolvedArlolra

Event Timeline

What is the relative path issue? And, is there a bug for that?

@ssastry It's not a bug per se, but basically Parsoid uses relative links starting with .:

E.g.

<!DOCTYPE html>
<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/">
<head prefix="mwr: http://en.wikipedia.org/wiki/Special:Redirect/">
	<meta charset="utf-8">
	<meta content="0" property="mw:pageNamespace">
	<meta content="1.4.0" property="mw:html:version">
	<link href="//en.wikipedia.org/wiki/Earth/Foo" rel="dc:isVersionOf">
	<title></title>
	<base href="//en.wikipedia.org/wiki/">
	<link href="//en.wikipedia.org/w/load.php?modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.content.parsoid%7Cmediawiki.skinning.interface%7Cskins.vector.styles%7Csite.styles%7Cext.cite.style%7Cmediawiki.page.gallery.styles&amp;only=styles&amp;skin=vector" rel="stylesheet">
</head>
<body class="mw-content-ltr sitedir-ltr ltr mw-body-content parsoid-body mediawiki mw-parser-output" dir="ltr" id="mwAA" lang="en">
	<p id="mwAQ"><a href="./Earth/Bar" id="mwAg" rel="mw:WikiLink" title="Earth/Bar">Earth/Bar</a></p>
</body>
</html>

This is correct, since there is a valid <base href>. But to use that, we'd have to either:

  • Inject it into the head, above the normal Flow scope (which might cause issues with unrelated content e.g. header/sidebar/footer). Don't know if we tried this, though, it might work.
  • Do our own base href fix (what we currently do).

If Parsoid used URLs starting with / we wouldn't need to do anything here.

Yes, hrefs in Parsoid HTML have to be resolved (absolutized) using the base href before you can use them in other contexts. We need to do this in VE too, to prevent URLs from breaking when the path is /w/index.php?... instead of /wiki/Pagename.