]> git.mxchange.org Git - friendica.git/commitdiff
Decode HTML entities in code blocks in HTML::toBBCode
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 15 Oct 2021 15:36:40 +0000 (11:36 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 15 Oct 2021 15:36:40 +0000 (11:36 -0400)
- Replace PHP_EOL uses with the more common \n

src/Content/Text/HTML.php

index 0e117a2205b9a7676897dd9f15e2f9a35a61d69a..e1caca48ae04c399ae7809052fa3d775dfbb0dad 100644 (file)
@@ -386,7 +386,7 @@ class HTML
                                        $prefix = '[code=' . $matches[1] . ']';
                                }
 
-                               return $prefix . PHP_EOL . trim($matches[2]) . PHP_EOL . '[/code]';
+                               return $prefix . "\n" . html_entity_decode($matches[2]) . "\n" . '[/code]';
                        },
                        $message
                );