• 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?

#1
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:
Code:
...
$response->params['example_url'] = "<a href="www.example.com>example!</a>";
...
On the page, where I use:

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

(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:
Code:
&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?