Encode reserved HTML characters to entities, or decode entities back. Optional escape for all non-ASCII.