Encode and decode HTML entities. Unescape a snippet or escape text safely, leaving non-ASCII characters intact.