Skip to content

Commit

Permalink
feat: Safely get view content
Browse files Browse the repository at this point in the history
feat: Safely get view content
  • Loading branch information
lukas-frey authored Jun 28, 2024
2 parents dea8b25 + f8db992 commit 2a51f98
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Actions/Forms/Components/HelpAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ protected static function getContentView(Documentable $documentable): HtmlString
$articleClass => ! empty($articleClass),
]);

return new HtmlString(\Blade::render(<<<blade
$replacementStringId = \Str::random();

$parsed = \Blade::render(<<<blade
<x-filament-knowledge-base::content class="$classes">
$html
$replacementStringId
</x-filament-knowledge-base::content>
blade));
blade);

return new HtmlString( \Str::replace($replacementStringId, $html, $parsed));
}

public static function forDocumentable(Documentable | string $documentable): static
Expand Down

0 comments on commit 2a51f98

Please sign in to comment.