mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Allow empty and maolformed links in markdown
When a user adds an invalid link in a page in markdown for example [](https://) and that page is parsed to be shown in a blog listing page that blog listing page crashes with a CRITICAL error. Instead of throwing an error the URL is now ignored. See also https://discord.com/channels/501836936584101899/506916956637495306/1185616779486167141
This commit is contained in:
parent
345086538c
commit
d4c7b4f36b
|
|
@ -1835,7 +1835,7 @@ abstract class Utils
|
|||
$parts = parse_url($enc_url);
|
||||
|
||||
if ($parts === false) {
|
||||
throw new InvalidArgumentException('Malformed URL: ' . $url);
|
||||
$parts = [];
|
||||
}
|
||||
|
||||
foreach ($parts as $name => $value) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user