From f6a7495ce5652ecba26323f44d3074834f0fbebf Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 21 Apr 2020 15:00:54 +0100 Subject: [PATCH] Bugfix: Replace newline characters in internal links with spaces - fixes #186 --- modules/parser-parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/parser-parsedown.php b/modules/parser-parsedown.php index 73fb545..dfb49b4 100644 --- a/modules/parser-parsedown.php +++ b/modules/parser-parsedown.php @@ -727,7 +727,7 @@ class PeppermintParsedown extends ParsedownExtreme if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches) === 1) { // 1: Parse parameters out // ------------------------------- - $link_page = trim($matches[1]); + $link_page = str_replace(["\r", "\n"], [" ", " "], trim($matches[1])); $display = $link_page . trim($matches[2]); if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false) {