Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions resources/views/components/layouts/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class="min-h-screen bg-white font-poppins antialiased dark:bg-zinc-900 dark:text
</flux:sidebar.nav>

<flux:dropdown position="top" align="start" class="max-lg:hidden">
<flux:sidebar.profile name="{{ auth()->user()->name ?? auth()->user()->email }}" />
<flux:sidebar.profile :name="auth()->user()->name ?? auth()->user()->email" />

<flux:menu>
<flux:menu.item icon="cog-6-tooth" href="{{ route('customer.settings') }}">Settings</flux:menu.item>
Expand Down Expand Up @@ -184,7 +184,7 @@ class="min-h-screen bg-white font-poppins antialiased dark:bg-zinc-900 dark:text
</a>

<flux:dropdown position="top" align="start">
<flux:profile name="{{ auth()->user()->name ?? auth()->user()->email }}" />
<flux:profile :name="auth()->user()->name ?? auth()->user()->email" />

<flux:menu>
<flux:menu.item icon="cog-6-tooth" href="{{ route('customer.settings') }}">Settings</flux:menu.item>
Expand Down
25 changes: 25 additions & 0 deletions tests/Feature/DashboardLayoutTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Tests\Feature;

use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class DashboardLayoutTest extends TestCase
{
use RefreshDatabase;

public function test_user_name_with_apostrophe_is_not_double_escaped_in_dashboard(): void
{
$user = User::factory()->create([
'name' => "Timmy D'Hooghe",
]);

$response = $this->withoutVite()->actingAs($user)->get('/dashboard');

$response->assertStatus(200);
$response->assertDontSee('D&amp;#039;Hooghe', false);
$response->assertSee("Timmy D'Hooghe");
}
}
Loading