Fix #563 -- Some custom template funcs cannot be used in JavaScript context
Merge pull request #565 from landr0id/fix-template-funcs-return

Fix #563 -- Some custom template funcs cannot be used in JavaScript cont...