Trying to link to Special:RecentChanges via [[Special:RecentChanges|]] should output as "RecentChanges" but instead outputs as it's input, which again, is "[[Special:RecentChanges|]]".
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Use preSaveTransform to allow the pipe trick among others | mediawiki/extensions/MediaWikiChat | master | +13 -4 |
Related Objects
Related Objects
Event Timeline
Comment Actions
Ooh I didn't even know that was a thing in normal wikitext... :D I'll have a look, I would have expected that to work as I thought MWC used the same parser as normal wikitext.
Comment Actions
hmm, looks like there is some sort of pre-parsing for this trick: https://en.wikipedia.org/wiki/Help:Pipe_trick
Comment Actions
You'll probably want Parser's preSaveTransform.
Quick example code you can run in /maintenance/eval.php to try it out:
global $wgParser; $user = User::newFromName( 'Jack Phoenix' ); $title = Title::newFromText( uniqid( 'tmp' ) ); $options = ParserOptions::newFromUser( $user ); echo $wgParser->preSaveTransform( '[[Special:RecentChanges|]]', $title, $user, $options );
This outputs [[Special:RecentChanges|RecentChanges]].
This comment was removed by UltrasonicNXT.
Comment Actions
Change 328927 had a related patch set uploaded (by UltrasonicNXT):
Use preSaveTransform to allow the pipe trick among others
Comment Actions
Change 328927 merged by jenkins-bot:
Use preSaveTransform to allow the pipe trick among others