Skip to content

Commit 13fb1ec

Browse files
committed
BugFix: HTML Special Chars in Table of Contents
1 parent d159a9f commit 13fb1ec

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

app/Http/Controllers/ShowDocumentationController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ protected function extractTableOfContents(string $document): array
238238
->map(function (string $line) {
239239
return [
240240
'level' => strlen(trim(Str::before($line, '# '))) + 1,
241-
'title' => $title = trim(Str::after($line, '# ')),
241+
'title' => $title = htmlspecialchars_decode(trim(Str::after($line, '# '))),
242242
'anchor' => Str::slug(Str::replace('`', 'code', $title)),
243243
];
244244
})
File renamed without changes.

0 commit comments

Comments
 (0)