text-width: Better text input parsing. Handle character escaping.