Skip to content

toHTML displays [html] #5037

Answered by Deltik
LaocheXe asked this question in Q&A Plugins
Jul 5, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

It looks like there's some BBcode mixed in. Have you tried setting the second parameter of e_parse::toHTML(), $parseBB, to true?

public function toHTML(
     $text,
     $parseBB = false,
     $modifiers = '',
     $postID = '',
     $wrap = false
 ): string

Here are two tests showing the difference between $parseBB being false versus true:

diff --git a/e107_tests/tests/unit/e_parseTest.php b/e107_tests/tests/unit/e_parseTest.php
--- a/e107_tests/tests/unit/e_parseTest.php	(revision 3c61b2e2dc52592c8a906118cad05cd4e21db880)
+++ b/e107_tests/tests/unit/e_parseTest.php	(date 1688535877660)
@@ -181,6 +181,22 @@
 
 	}
 
+	public function testToHtml5037_1()
+	{
+		$input = "[html]<div class='c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LaocheXe
Comment options

Answer selected by LaocheXe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants