https://bugzilla.wikimedia.org/show_bug.cgi?id=62856
--- Comment #15 from Brad Jorsch <[email protected]> --- (In reply to MWJames from comment #14) > Of course, if you are telling me that this is the expected behaviour then > naturally you can argue that MW 1.21/MW 1.22 were wrong in the first place > and that MW 1.23 has been fixed. Yes, that's exactly what I'm telling you. > As for SMW, InternalParseBeforeLinks is used to create annotations. > > If the text component delivered by the InternalParseBeforeLinks hook carries > a "#REDIRECT target" (which works of course if we use > $this->parser->parse(...) and worked for $content->getParserOutput( .. ) on > MW 1.21/MW 1.22 ) then something like > ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT > )->getRedirectTarget() or Title::newFromRedirect( $text ) will work as > expected. > > The problem is that text component retrieved through the > InternalParseBeforeLinks hook no longer carries the "#REDIRECT ...". I see, SMW has its own wikitext parser. That seems fragile. I still believe that since the #REDIRECT line shouldn't be being parsed it shouldn't be included in the wikitext passed to the parser; if it were being passed to Parser::parse(), that function should still be stripping it off before it gets to the point of calling InternalParseBeforeLinks. It would make more sense to me that the redirect target be included as metadata somehow, which probably means storing it in the ParserOptions. Would that work for you? -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
