Automatically decode/encode entities