= Problem
It seems that Page Previews shows the "<translate>" tag in the preview when the destination page has it. It shouldn't be displayed.
It's possible this only happens if a translate tag is not closed in the current section and exintro parameter is used (see T168743).
e.g.
```
<languages/>
<translate> <!-- open translate tag in section 0 -->
<!--T:1-->
This page links instructions for common '''administrative tasks''' which you may wish to perform once your [[<tvar|inst-guide>Manual:Installation guide</>|installation]] of MediaWiki is completed.
== New section ==
</translate> <!-- closed translate tag in section 1 -->
```
= Replication steps
== without explaintext
* Visit https://meta.wikimedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=extracts&titles=Community_Engagement&exsentences=5&exintro=1
OR https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&format=json&maxage=300&prop=extracts&titles=Manual%3AConfiguration&redirects=1&formatversion=2&exchars=525&exintro=1
* Note <translate> in the response.
== With explaintext
* Visit https://meta.wikimedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=extracts&titles=Community_Engagement&exsentences=5&exintro=1&explaintext=1
OR https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&format=json&maxage=300&prop=extracts&titles=Manual%3AConfiguration&redirects=1&formatversion=2&exchars=525&exintro=1&explaintext=1
* Note <translate> in the response
= Cause
T168743
= Examples
Any one of the following links shows the problem,
# go to https://meta.wikimedia.org/wiki/Technical_Collaboration
# hover over "Community Engagement", which points to https://meta.wikimedia.org/wiki/Community_Engagement
# hover over "Volunteer Supporters Network", which points to https://meta.wikimedia.org/wiki/Volunteer_Supporters_Network
In that page, there is also the link "Improve collaboration with communities in product development", which is a more complex case because anchors and HTML are involved in the destination page: https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan/2016-2017/Final#Program_7:_Improve_collaboration_with_communities_in_product_development
= AC
[] Before signing off on this, [document this behavior in the extension's docs](https://www.mediawiki.org/wiki/Extension:Popups).
= Possible workarounds
[] Any <translate> tags encountered should be "flattened" inside the filterContent method
[] Any <tvar|.*> tags encountered should be "flattened" inside the filterContent method - note the tag name will always begin with "tvar|" but the text after the pipe is arbitary e.g. <tvar|wmf>
This can be fixed either in the HtmlFormatter (upstream) or in the ExtractFormatter
[[ https://gerrit.wikimedia.org/r/360984 | A test is provided (only for translate tag) ]] however it only seems to fail locally without HHVM.