Fix optional escaping in showmessage function