diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index a25883eb16..557e737096 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -336,8 +336,6 @@ class HTML $message = html_entity_decode($message, ENT_QUOTES, 'UTF-8'); - $message = str_replace(["<"], ["<"], $message); - // remove quotes if they don't make sense $message = preg_replace('=\[/quote\][\s]*\[quote\]=i', "\n", $message); diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 798f607927..2202331b12 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2365,7 +2365,7 @@ class DFRN $item["body"] = XML::getFirstNodeValue($xpath, "dfrn:env/text()", $entry); $item["body"] = str_replace([' ',"\t","\r","\n"], ['','','',''], $item["body"]); // make sure nobody is trying to sneak some html tags by us - $item["body"] = Strings::escapeTags(Strings::base64UrlDecode($item["body"])); + $item["body"] = Strings::base64UrlDecode($item["body"]); $item["body"] = BBCode::limitBodySize($item["body"]); diff --git a/tests/src/Content/Text/HTMLTest.php b/tests/src/Content/Text/HTMLTest.php index 1d550049a9..fe54399014 100644 --- a/tests/src/Content/Text/HTMLTest.php +++ b/tests/src/Content/Text/HTMLTest.php @@ -58,6 +58,10 @@ class HTMLTest extends MockedTest 'expectedBBCode' => '[audio]http://www.cendrones.fr/colloque2017/jonathanbocquet.mp3[/audio]', 'html' => '', ], + 'bug-8075-html-tags' => [ + 'expectedBBCode' => " I don't understand tests", + 'html' => "<big rant here> I don't understand tests", + ], ]; }