Fixed bug that was not escaping output of template functions that were inside escaped tags