functions are autoescaped unless .safe property explicitly set

TODO:

 * [ ] - regression test for gh-306
 * [ ] - regression test for gh-302
 * [ ] - regression test for gh-297