As with title, really. The "preview" attached to the output of Special:ExpandTemplates (when the context title is not specified) includes useless section edit links that do nothing when you click on them. I realise you may want to preview with edit links (although I can't think why you'd be using the special page for this), but in the vast majority of cases they're surely just annoying; where they are necessary, a context title could and should be provided.
My proposal, then: suppress section edit links where context title is not specified.
Steps to replicate the issue
- Load https://www.mediawiki.org/wiki/Special:ExpandTemplates?wpInput=%3dHeading%3d&wpGenerateRawHtml=1
Current result:
<div class="mw-parser-output"><h1><span class="mw-headline" id="Heading">Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Special:ExpandTemplates&action=edit&section=1" title="Edit section: Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1></div>
Heading [ edit ]
Expected result:
<div class="mw-parser-output"><h1><span class="mw-headline" id="Heading">Heading</span></h1></div>
Heading