I\'ve got a freemarker template that displays the same string in a context where HTML is allowed as well as a context where it is not.
Is there a built-in in Freemarker
There isn't anything built in as of 2.3.28, so yes, you have to create your own.