aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-10-05 11:35:02 +0000
committerMario <mario@mariovavti.com>2023-10-05 11:35:02 +0000
commit044e252d195be7fb9c523e5ab7e5f37eae7f03fd (patch)
treee8fcefdef750aee3e84e2ddb048e1e11a1c4599f /vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php
parent6920fb2793265e5c9cdcdc8325398b07f216f184 (diff)
downloadvolse-hubzilla-044e252d195be7fb9c523e5ab7e5f37eae7f03fd.tar.gz
volse-hubzilla-044e252d195be7fb9c523e5ab7e5f37eae7f03fd.tar.bz2
volse-hubzilla-044e252d195be7fb9c523e5ab7e5f37eae7f03fd.zip
composer update html to markdown
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.