Escape error messages in error dialog