sukria/Dancer — pull request #775 by bigpresh (2012-04-12 10:08:49+00:00)
Title: Clone settings etc into template params.

This should fix an interesting bug reported on the mailing list:

http://www.backup-manager.org/pipermail/dancer-users/2012-April/002424.html

Basically, we stored the settings hashref from Dancer::Config->settings into the
template params, for convenient access to the settings from the template.

This was good, except if you use [Dancer::Plugin::EscapeHTML][D::P::EscapeHTML]
with the `automatic_escaping` option set, in which case, it walks through the
template params just before they're given to the template, HTML-encoding
stuff... including walking through the app's settings, as they're passed by
reference.

Cloning should solve this issue.

[D::P::EscapeHTML]: http://p3rl.org/Dancer::Plugin::EscapeHTML

I haven't tested this carefully yet, but all our tests still pass with this change at least.