Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Output Text without encoding HTML characters

Go to End

3 Posts   2336 Views


Community Member, 176 Posts

12 May 2010 at 2:36am

I've recently upgraded one of my clients to version 2.4, but I failed to notice an issue when testing.

Pre version 2.4 I could have a variable of the type Text output it's content in a template, in version 2.4 its output is automatically HTML encoded. I can't use HTMLText as this seems to break things. Is there a way to disable the automatic HTML encoding of a Text field?


Community Member, 1 Post

14 July 2010 at 3:09am

HTML-Encoding is disabled for ContentController functions. So if you want to pass unencoded values to the template, just create a proxy function in the ContentController.


Community Member, 3 Posts

22 August 2010 at 6:54am

That's true. Inside your function, you can make use of

to turn back the markups.