Opensearch: Fixed XML declaration when php short tags enabled

For #5673
This commit is contained in:
Dan Brown
2025-07-01 11:29:16 +01:00
parent dfeca246a0
commit 3d017594a8
2 changed files with 2 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
@php echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; @endphp
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>{{ mb_strimwidth(setting('app-name'), 0, 16) }}</ShortName>
<Description>{{ trans('common.opensearch_description', ['appName' => setting('app-name')]) }}</Description>

View File

@@ -15,6 +15,7 @@ class OpensearchTest extends TestCase
$resp = $this->get('/opensearch.xml');
$resp->assertOk();
$resp->assertSee('<?xml version="1.0" encoding="UTF-8"?>' . "\n", false);
$html = $this->withHtml($resp);