Adding output escaping for text strings