**What happens?**:
Cargo **[[ https://www.mediawiki.org/wiki/Extension:Cargo/Querying_data | query ]]** HTML, that is created by setting **[[ https://www.mediawiki.org/wiki/Extension:Cargo/Display_formats#template | display format ]]** `|format=template`, shows as escaped on-page when saved. The escaped HTML can be fixed by purging the page; however, the issue remains for **PageForms** extensions, whose queries of Cargo queries `|format=template` remain permanently broken (displaying **always** as escaped HTML) because these can't be purged. We use PageForms queries to create form-controlled inputs to cargo data table displays, with custom table formatting.
I found **[[ https://www.mediawiki.org/wiki/Extension_talk:Cargo/Archive_March_to_May_2018#Cargo_Query_showing_escaped_HTML_tags_when_page_is_saved | this ]]** old cargo issue report and **[[ https://www.mediawiki.org/wiki/Extension_talk:Cargo/Archive_October_to_December_2017#Links/images_sometimes_displaying_as_plaintext | this ]]** one, suggesting incompatibility between **Cargo** and the **ConfirmEdit** extension, packaged with MediaWiki. Since our wiki is on a large wiki farm (Miraheze) we cannot (and is not feasible) to disable ConfirmEdit since will affect all wikis. This remains a problem as of our current 1.36.2.
**What should have happened instead?**:
Pages should have rendered HTML, not escaped HTML, for cargo queries on page save, and in PageForms queries.
**Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc**:
|MediaWiki|1.36.2 (d17f10c)|
|PHP|7.3.31-1~deb10u1 (fpm-fcgi)|
|MariaDB|10.4.21-MariaDB-1:10.4.21+maria~buster-log|
**PageForms: 2.8** (19b7b42)
Publicly viewable examples and screenshots available **[[ https://frozenplum.miraheze.org/wiki/Cargo_Problem | here ]]**.
**Steps to reproduce on a site with an existing Cargo table, that already has pages populating the table:**
1. Create page entitled **[[ https://frozenplum.miraheze.org/wiki/Cargo_Query | Cargo_Query ]]** (change "MyTable" in the code below to an existing Cargo table name, and change "type" to an existing parameter for the same table/template).
```
{{#cargo_query:table=MyTable
|fields=_pageTitle=Title, type
|named args=yes
|format=template
|template=FormatRow
|limit=10
|delimiter=\n
|default=No items to display
|more results text=
}}
```
2. Create **[[ https://frozenplum.miraheze.org/wiki/Template:FormatRow | Template:FormatRow ]]** (making sure to change "Existing File.png" in the example below to the name of a file that exists on-wiki):
```
<noinclude><pre>This is a per-line cargo result formatting template</pre>
</noinclude>
<includeonly>
[[{{{Title}}}|{{{Title}}}]]
{{{type|}}}
[[File: Name.png|100px]]
</includeonly>
```
3. Go back to the **Cargo_Query** you just created, edit and make a change (even just adding <!-- note --> is fine, preview to see intended results, then save the page to see resulting, escaped HTML on-page, purging will render as expected.
**To see that this also causes the same (unfixable/unpurgable) issue in PageForms queries**, with PageForms enabled try viewing `Special:RunQuery/<form name>` on any form whose corresponding template has `|format=template` and `|template=RowTemplate` set, and where "RowTemplate" has images in the output.
A quick sample form to create is located [[ https://frozenplum.miraheze.org/wiki/Form:MyPage_queryForm | here ]], and ability to [[ https://frozenplum.miraheze.org/wiki/Special:RunQuery/MyPage_queryForm | run the query ]] is located here.
I don't see this listed on the known issues page for either PageForms or Cargo, and as the previous reports were significantly aged, this is to confirm the issue remains with Cargo and MediaWiki 1.36.2 packaged extensions (possibly ConfirmEdit).