Last modified: 2013-10-23 18:17:31 UTC
Define a simple parser tag extension <junk> that returns "abcde": <?php $wgHooks['ParserFirstCallInit'][] = 'efJunk'; function efJunk(&$parser) { $parser->setHook('junk', 'efJunkCallback'); return true; } function efJunkCallback($input, $args, $parser, $frame) { return 'abcde'; } When displayed in the wiki, it seems to work fine: {{#tag:junk}} ==> abcde But when the value is passed to other parser functions, it breaks: {{#len:{{#tag:junk}}}} ==> 1 {{#ifeq:{{#tag:junk}}|abcde|yes|no}} ==> no Since the value display correctly, I hypothesize that {{#tag:junk}} is returning a 1-character, null-terminated string in front of "abcde".
IIRC it'll be saving a strip marker; the 'abcde' won't get replaced in until later stages of parsing.