fix for unicode content in simplates

Picks up from #314.