Skip to content

Commit bef583e

Browse files
committed
Updated Yaml rendering
1 parent 870dbb1 commit bef583e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

modules/os2forms_fordelingskomponent_debug/src/Controller/AbstractController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ protected function formatDatetime(?int $timestamp): ?string {
2121
/**
2222
* Render YAML.
2323
*/
24-
protected function renderYaml(?\JsonSerializable $value): string {
25-
return '<pre><code>' . Yaml::dump(json_decode(json_encode($value), TRUE),
26-
inline: PHP_INT_MAX) . '</code></pre>';
24+
protected function renderYaml(?\JsonSerializable $value): string
25+
{
26+
return '<pre><code>'
27+
. htmlspecialchars(Yaml::dump(json_decode(json_encode($value), TRUE), inline: PHP_INT_MAX))
28+
. '</code></pre>';
2729
}
2830

2931
}

0 commit comments

Comments
 (0)