From 39cb3e68b9c46fa6c31ef46430df4b4e7f0ce9d5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Dec 2019 23:20:09 -0500 Subject: [PATCH] Remove faulty escape for HTML entities in BBCode::toMarkdown - Mangled Markdown output with chevrons --- src/Content/Text/BBCode.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index e5622d14b4..a3d26a7367 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -2052,9 +2052,6 @@ class BBCode extends BaseObject $text = self::convert($text, false, 4); } - // mask some special HTML chars from conversation to markdown - $text = str_replace(['<', '>', '&'], ['&_lt_;', '&_gt_;', '&_amp_;'], $text); - // If a link is followed by a quote then there should be a newline before it // Maybe we should make this newline at every time before a quote. $text = str_replace(['
'], ['
'], $text); @@ -2064,9 +2061,6 @@ class BBCode extends BaseObject // Now convert HTML to Markdown $text = HTML::toMarkdown($text); - // unmask the special chars back to HTML - $text = str_replace(['&\_lt\_;', '&\_gt\_;', '&\_amp\_;'], ['<', '>', '&'], $text); - $a->getProfiler()->saveTimestamp($stamp1, "parser", System::callstack()); // Libertree has a problem with escaped hashtags. -- 2.39.5