diff options
author | Mario <mario@mariovavti.com> | 2024-05-03 11:50:29 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-05-03 11:50:29 +0000 |
commit | 605aa37ad35387cbd84d1efd7bd744b5f1eb166c (patch) | |
tree | 4d1606c07da3cbb0ff09d376c73cbae21558ef95 /include/html2plain.php | |
parent | 262cebb5688ae6b73db38badc6d7a66db460a70c (diff) | |
download | volse-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.php | 4 |
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", ""); |