rename encode/decode
add HTML escape method