Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » $MenuTitle with HTML entities

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 384 Views
  • BobRock
    Avatar
    Community Member
    15 Posts

    $MenuTitle with HTML entities Link to this post

    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?

    Bob

    384 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.