escape function for precompiled lodash or underscore templates