Page MenuHomePhabricator

Flow: Parsoid ref handling broken by <base href> tag
Closed, ResolvedPublic

Description

In a Flow post, add the wikitext:

Test<ref>Reference</ref>
<references>

Parsoid generates a reference counter and a references section with <a href="#cite_note-1"> links between them. Wahoo!

But Flow's includes/View.php outputs a

<base href="/wiki/Talk:Name_of_Flow_board">

tag. That turns the local href into a full URL to the Flow board. So if you view a single topic at its Permalink, then clicking the [1] or ↑ forces a page reload (unfortunate) and if the post is old and not part of the first 10 topics on the board, the fragment won't be on the page at all (bad).

The comment in View.php before outputting a base href tag is "Temporary hack to make relative links work when the page is requested as /w/index.php?title=". But nowadays links to pages and to images are no longer relative links, they are absolute paths like href="/wiki/Main_Page" and src="//ee-flow.wmflabs.org/w/images/7/77/Cucurbita_moschata_Butternut_2012_G2.jpg". So maybe the base href is no longer required?


Version: master
Severity: normal

Details

Reference
bz62691