escape and unescape methods now return an empty string if the passed argument is invalid