ladybird/Userland/Libraries/LibMarkdown
Ali Caglayan 1ee3ec16a9 Userland: Fix absolute paths in man page links
Absolute paths in man page links such as

```
[some link](/foo/bar)
```

Were being interpreted as relative paths when rendered in HTML. This
issue was observed in #20889 and #20041.

The fix is to make sure we don't leave any absolute paths when parsing
links. Instead we check if a directory is absolute (by checking for `/`)
and add `file://` accordingly. This turns the above link into:

```
[some link](file:///foo/bar)
```

Which does get interpreted correctly when rendered as HTML.

- fixes #20889
- fixes #20041

Before this patch, opening the Help application would raise an error.
Now all the pictures in the man pages render correctly.
2023-09-06 15:02:44 +01:00
..
Block.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
BlockQuote.cpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
BlockQuote.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
CMakeLists.txt LibMarkdown+LibSyntax: Add a Markdown syntax highlighter 2023-05-05 17:08:40 +01:00
CodeBlock.cpp LibMarkdown: Preserve blank lines in CodeBlocks 2023-08-04 13:16:32 +02:00
CodeBlock.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
CommentBlock.cpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
CommentBlock.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
ContainerBlock.cpp Everywhere: Stop using NonnullOwnPtrVector 2023-03-06 23:46:35 +01:00
ContainerBlock.h Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
Document.cpp LibMarkdown: Convert render_to_terminal to String 2023-07-03 02:05:32 +02:00
Document.h LibMarkdown: Convert render_to_terminal to String 2023-07-03 02:05:32 +02:00
Forward.h LibMarkdown: Correct typo in forward declaration of HorizontalRule 2022-04-26 23:23:36 -07:00
Heading.cpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
Heading.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
HorizontalRule.cpp LibMarkdown: Avoid catastrophic backtracking in thematic break regex 2023-04-14 16:02:59 +01:00
HorizontalRule.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
LineIterator.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
LineIterator.h LibMarkdown: Make LineIterator::operator- take a const reference 2023-05-05 17:08:40 +01:00
List.cpp Everywhere: Stop using NonnullOwnPtrVector 2023-03-06 23:46:35 +01:00
List.h LibMarkdown: Render lines to terminal instead of a single string 2022-12-31 00:09:23 +01:00
Paragraph.cpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
Paragraph.h Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
SyntaxHighlighter.cpp LibSyntax+Userland: Make LibSyntax not depend on LibGUI 2023-08-29 07:57:39 -04:00
SyntaxHighlighter.h LibMarkdown+LibSyntax: Add a Markdown syntax highlighter 2023-05-05 17:08:40 +01:00
Table.cpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
Table.h LibMarkdown: Add method to get access to Table columns 2023-08-07 13:24:25 -06:00
Text.cpp Userland: Fix absolute paths in man page links 2023-09-06 15:02:44 +01:00
Text.h LibMarkdown: Add render_for_raw_print methods to Node derived classes 2023-08-07 13:24:25 -06:00
Visitor.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00