A
account8226
Guest
Hello,
I am trying to parse the result of a text storred in my database, I tried to stored the text as BB Code and then HTML.
I would like to parse the content stored in my database.
I tried with the following code :
Then I send my object within the $viewParams parameters.
But it looks like in my template, xen:foreach is escaping my chars (with htmlspecialchars).
How could I parse my text to my template ?
Best regards.
I am trying to parse the result of a text storred in my database, I tried to stored the text as BB Code and then HTML.
I would like to parse the content stored in my database.
I tried with the following code :
PHP:
foreach ($lastMessages AS $key => $mess)
{
$formatter = XenForo_BbCode_Formatter_Base::create();
$parser = new XenForo_BbCode_Parser($formatter);
$message[$key]['content'] = $parser->render("[b]This is a just a <i>test</i>[/b]");
}
Then I send my object within the $viewParams parameters.
But it looks like in my template, xen:foreach is escaping my chars (with htmlspecialchars).
How could I parse my text to my template ?
Best regards.