[dancer-users] Best practice to escape HTML entities in Dancer2 and TT

Andrew Beverley andy at andybev.com
Thu Mar 22 22:03:01 GMT 2018


On Thu, 22 Mar 2018 12:45:31 -0600 Scott H wrote:
> Unrecognized response type from route:
> Template::Stash::AutoEscaping::Escaped::HTML.

I've not been following this properly so might be jumping to
conclusions, but that normally means you're returning something other
than a simple string scalar from your route. Even if an object
stringifies, you still need to force the stringification (e.g.
concatenate with "" or use whatever method is available). So you
probably need to do that somewhere in the code that renders the
template.

Andy


More information about the dancer-users mailing list