aboutsummaryrefslogtreecommitdiffstats
path: root/include/html2plain.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-05-03 11:50:29 +0000
committerMario <mario@mariovavti.com>2024-05-03 11:50:29 +0000
commit605aa37ad35387cbd84d1efd7bd744b5f1eb166c (patch)
tree4d1606c07da3cbb0ff09d376c73cbae21558ef95 /include/html2plain.php
parent262cebb5688ae6b73db38badc6d7a66db460a70c (diff)
downloadvolse-hubzilla-605aa37ad35387cbd84d1efd7bd744b5f1eb166c.tar.gz
volse-hubzilla-605aa37ad35387cbd84d1efd7bd744b5f1eb166c.tar.bz2
volse-hubzilla-605aa37ad35387cbd84d1efd7bd744b5f1eb166c.zip
apply li fixes to html2plain
Diffstat (limited to 'include/html2plain.php')
-rw-r--r--include/html2plain.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/html2plain.php b/include/html2plain.php
index 5cb7ee35d..88dce577d 100644
--- a/include/html2plain.php
+++ b/include/html2plain.php
@@ -129,6 +129,8 @@ function html2plain($html, $wraplength = 75, $compact = false)
if(!$message)
return;
+ $message = preg_replace('/\<li(.*?)\>/', "\n*", $message);
+ $message = str_replace('</li>', '', $message);
$doc = new DOMDocument();
$doc->preserveWhiteSpace = false;
@@ -178,7 +180,7 @@ function html2plain($html, $wraplength = 75, $compact = false)
//node2bbcode($doc, 'ul', array(), "\n[list]", "[/list]\n");
//node2bbcode($doc, 'ol', array(), "\n[list=1]", "[/list]\n");
- node2bbcode($doc, 'li', array(), "\n* ", "\n");
+ //node2bbcode($doc, 'li', array(), "\n* ", "\n");
node2bbcode($doc, 'hr', array(), "\n".str_repeat("-", 70)."\n", "");