• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

PHP callbacks for new pages - special HTML encoding?

I followed this excellent tutorial on how to set up custom pages and write php callbacks to generate dynamic html content, and have that all working splendidly. However, when I use my php callback to return any html code, it is encoded incorrectly.

For example, if I use the callback to return this:
$response->params['example_url'] = "<a href="www.example.com>example!</a>";
On the page, where I use:

<div id="example">
I see this:
<a href="www.example.com>example!</a>
Instead of this:

(I am not talking about the BBCode I used to make "example!" a url, I am talking about the fact that is shows the raw html instead of formatting it as a url.)

And if I take a look at the source, I see this:
&lt;a href=&quot;www.example.com&gt;example&lt;/a&gt;
I understand this some kind of html special encoding, but I can't seem to disable or decode it. What am I doing wrong?