escape logic extracted
Remove empty mimeType
Hb: Remove lang substitutor