Gossamer Forum
Quote Reply
Prevent escaping html
Hi

When I create my own modules with functions and call the function from within the templates, my function will return html.
However I discover that the html is escaped when this is being print out. How do I prevent this?

Thanks.
Quote Reply
Re: [dauhee] Prevent escaping html In reply to
Hi,

Your function should return a scalar reference. So instead of:

return $string;

it should be:

return \$string;

By default everything is HTML escaped for security reasons.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Prevent escaping html In reply to
Thanks Alex.

It works now.