Replace tabs with spaces in templates