From 116e0dc4dec62c18e71a517b0564860e0945ad30 Mon Sep 17 00:00:00 2001 From: Peter Elliott Date: Sun, 24 Apr 2022 22:56:00 -0600 Subject: LibMarkdown: Limit headings to 6 levels --- Userland/Libraries/LibMarkdown/Heading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibMarkdown') diff --git a/Userland/Libraries/LibMarkdown/Heading.cpp b/Userland/Libraries/LibMarkdown/Heading.cpp index c4b54aef91..2eb24c0447 100644 --- a/Userland/Libraries/LibMarkdown/Heading.cpp +++ b/Userland/Libraries/LibMarkdown/Heading.cpp @@ -57,7 +57,7 @@ OwnPtr Heading::parse(LineIterator& lines) break; } - if (!level || level >= line.length() || line[level] != ' ') + if (!level || level >= line.length() || line[level] != ' ' || level > 6) return {}; StringView title_view = line.substring_view(level + 1, line.length() - level - 1); -- cgit v1.2.3