I'm using Message Manager for adding messages to my custom Joomla 3.x page.
I can display messages inside a block using:
But if I use
I get the HTML for it (br's, ) instead of plain text.
There is a related issue on Github:
I've got the same problem (at least with version 3.6.0) and this is what I did:
You can create your own renderer, or make use of the Joomla one.
You should use an "A message" (not JText) object to get plain text. And as asked in the Github issue you linked above (or mentioned in the documentation here), you need to install Joomla's XML renderer (it has to be enabled by default in Joomla 3.5 and later), and set $this->textRender to it, so your text renderer can render its content as plain text, for example:
$this->textRender = $message->textRender;
There is a way to make this work using a JMessage object. It will print the content exactly as you want it to be, even if there are linebreaks and tags.