Rendering HTML entities like © on View


#1

Hi,
I would like to know how to turn off the escaping of html entities like © and let the View class render it as ©?

Thanks,


#2

Set it as a template.

$this->template = new \atk4\ui\Template('any html © here');

You can also use unicode character, which should work perfectly without encoding.


#3

Thank you for your reply!

This is what I was doing earlier:

   $this->Layout->add(['View','Copyright © 2016-2017, ACME'],'Footer');

Then, I followed your instruction:

   $v=$this->Layout->add(['View'],'Footer');
   $v->template=new Template('Copyright © 2016-2017, ACME');

It performed as it should.