Page MenuHomePhabricator

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


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 or later (currently 1.2.1).

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

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 21 2017, 6:08 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJun 21 2017, 6:08 PM

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 .:


<!DOCTYPE html>
<html prefix="dc: mw:">
<head prefix="mwr:">
	<meta charset="utf-8">
	<meta content="0" property="mw:pageNamespace">
	<meta content="1.4.0" property="mw:html:version">
	<link href="//" rel="dc:isVersionOf">
	<base href="//">
	<link href="//;only=styles&amp;skin=vector" rel="stylesheet">
<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>

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.

Restricted Application added a project: Growth-Team. · View Herald TranscriptSep 2 2018, 11:24 PM