From 1b2f67906ba8bff26cc8a5da66b494f396db926f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 13 May 2016 22:23:46 +0200 Subject: [PATCH 1/2] Bugfix for shares in the plaintext function --- include/plaintext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plaintext.php b/include/plaintext.php index 39eed5111e..30ea5d9eed 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -343,7 +343,7 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2, $t } } - $html = bbcode($post["text"], false, false, $htmlmode); + $html = bbcode($post["text"].$post["after"], false, false, $htmlmode); $msg = html2plain($html, 0, true); $msg = trim(html_entity_decode($msg,ENT_QUOTES,'UTF-8')); From 247f866655440bac8f3cd8b1eecdaeb08400ae3a Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 15 May 2016 10:36:56 +0200 Subject: [PATCH 2/2] There were undecoded entities in the title --- include/plaintext.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/plaintext.php b/include/plaintext.php index 30ea5d9eed..559e0a0e83 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -128,10 +128,9 @@ function get_attachment_data($body) { if ($matches[1] != "") $title = $matches[1]; - //$title = htmlentities($title, ENT_QUOTES, 'UTF-8', false); $title = bbcode(html_entity_decode($title, ENT_QUOTES, 'UTF-8'), false, false, true); + $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); $title = str_replace(array("[", "]"), array("[", "]"), $title); - if ($title != "") $data["title"] = $title;