What is the right way to produce a link to an existing article within a parser function?
I tried Linker::link() embedded within a bunch of Xml::openElement and Xml::closeElement
calls, and the "A" tag got escaped. So this PHP code:
Xml::openElement('li')
. $linker->link($title)
. Xml::closeElement('li')
rendered as escaped like this:
<ul><li> <a href=http://mywiki/wiki/articlename>
</li></ul>
etc.
Maybe this is because parser functions return wikitext and Linker::link() returns
HTML...?
I don't want to produce a manual "A" tag with Xml::element('a')
because I need the rest of the intelligence of Linker::link(), like redlinking for
nonexistent articles.
Thanks,
DanB