Skip to content

Commit 833645f

Browse files
committed
Ref #19398 - Use application/json instead of text/plain for JSON export
Ref: #19398 Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 207a36c commit 833645f

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ phpMyAdmin - ChangeLog
1212
- issue #17009 Implement the security header `Permissions-Policy`
1313
- issue #17951 Allow rollbacking SET queries
1414
- issue #18529 Add copy to clipboard for export as text
15+
- issue #19398 Use `application/json` instead of `text/plain` for JSON export
1516

1617
5.2.2 (not yet released)
1718
- issue #17851 Fix total count of rows in not accurate

src/Plugins/Export/ExportJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function setProperties(): ExportPluginProperties
6363
$exportPluginProperties = new ExportPluginProperties();
6464
$exportPluginProperties->setText('JSON');
6565
$exportPluginProperties->setExtension('json');
66-
$exportPluginProperties->setMimeType('text/plain');
66+
$exportPluginProperties->setMimeType('application/json');
6767
$exportPluginProperties->setOptionsText(__('Options'));
6868

6969
// create the root group that will be the options field for

tests/unit/Plugins/Export/ExportJsonTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testSetProperties(): void
7878
);
7979

8080
self::assertSame(
81-
'text/plain',
81+
'application/json',
8282
$properties->getMimeType(),
8383
);
8484

0 commit comments

Comments
 (0)