Page MenuHomePhabricator

Incorrect substitution of [] in ref when combined with transcluded nowiki items
Closed, ResolvedPublic

Description

The problem can be observed here: https://proofwiki.org/wiki/Definition:Link_(Bourbaki_Theory)
ProofWiki currently runs on MW 1.25.

The square brackets of the ref tag are substituted with elements that are surrounded by nowiki statements. I would expect the square brackets to work as usual.

Minimal example (I think):

blablabla<ref>that was me</ref>
{{stub}}

where Template:Stub contains:
<nowiki>left-bracket</nowiki> random_stuff <nowiki>right-bracket</nowiki>

would yield left-bracket1right-bracket instead of the expected [1] as the clickable link for reference 1.
Interestingly, in the editing preview, the square brackets are correctly rendered.

Event Timeline

ProofWiki currently runs on MW 1.25.

Does the problem still happen in a supported MediaWiki version (1.26 or 1.27)?
1.25 is deprecated and unmaintained...

Thanks for your time.

I tried to reproduce it on the MediaWiki wiki (which currently runs 1.28) and didn't manage to.
This could in theory be caused by the MediaWiki wiki using the Parsoid parser (which ProofWiki doesn't), but I didn't manage to find a definitive answer to that question.

We are in the process of upgrading our MediaWiki installation. I don't presently have access to a wiki with 1.26 or 1.27, so if there's no other good way to reproduce this I'll get back once the upgrade has been carried out.

Aklapper changed the task status from Open to Stalled.Aug 1 2016, 5:53 AM
Aklapper triaged this task as Lowest priority.
Lord_Farin claimed this task.

I checked and this does not recur on ProofWiki for MW 1.27 (which I tested on a local VM).
So it seems that upgrading will automatically tackle this for us, which is great.

I hope it's fine to put this to status "Resolved"; otherwise please feel free to change it again.