aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-12-16 16:05:52 +0100
committerHarald Eilertsen <haraldei@anduin.net>2023-12-16 16:05:52 +0100
commit19dd1fe86605bc85e8a0bf4efd6f195db258f60a (patch)
tree5d5b1fac3ad1760189ea0daf1bf5639e4ba0d100 /vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
parent6a5f78543fb2f5329e54209253b8c0d0f1d7a91d (diff)
parent69266cd6c65d228320dede32a343a9d3f3ea63df (diff)
downloadvolse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.tar.gz
volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.tar.bz2
volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.zip
Merge branch 'dev' into tests/test-db-setup-wip
Diffstat (limited to 'vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php')
-rw-r--r--vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php b/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
index 7d8ccc132..af6dd1051 100644
--- a/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
+++ b/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
@@ -11,7 +11,9 @@ class PreformattedConverter implements ConverterInterface
public function convert(ElementInterface $element): string
{
$preContent = \html_entity_decode($element->getChildrenAsString());
- $preContent = \str_replace(['<pre>', '</pre>'], '', $preContent);
+ $preContent = \preg_replace('/<pre\b[^>]*>/', '', $preContent);
+ \assert($preContent !== null);
+ $preContent = \str_replace('</pre>', '', $preContent);
/*
* Checking for the code tag.