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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Blog Module /

Discuss the Blog Module.

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

$MenuTitle with HTML entities

Go to End



Community Member, 15 Posts

3 September 2013 at 8:04am

When $MenuTitle returns to a template and contains HTML entities, those entities are rendered a literals instead of HTML. So

<h2><a href="$Link" title="<% _t('VIEWFULL', 'View the full post titled') %> '$Title'">$MenuTitle</a></h2>

returns as: Just An Example&#8217;s Post

instead of as: Just An Example’s Post

I used SmartyPants to filter the MenuTitle() function's return value like this:

return SmartyPants($this->getMenuTitle());

Why is that? And how can I fix it?