Fix find regex in _encode_escape_chars.
Adding tests for _unescape_entities and _encode_escape_chars.