Skip to content

Commit c09ec3f

Browse files
committed
fix(i18n): encode connectivity tooltips
1 parent 6cd7980 commit c09ec3f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/Livewire/NodeClientConnectivity.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ public function render(): View
7474

7575
private function makeIcon(TablerIcon $icon, string $color, string $tooltip): string
7676
{
77+
$tooltip = json_encode($tooltip, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_THROW_ON_ERROR);
78+
7779
return generate_icon_html($icon, attributes: (new ComponentAttributeBag())
7880
->merge([
7981
'x-tooltip' => '{
80-
content: "' . $tooltip . '",
82+
content: ' . $tooltip . ',
8183
theme: $store.theme,
82-
allowHTML: true,
84+
allowHTML: false,
8385
placement: "bottom",
8486
}',
8587
'style' => 'color: var(--dark-text, var(--text))',

0 commit comments

Comments
 (0)