add encode and decode for fixing \n on text area bug. closed #1

Signed-off-by: Lee <jessy1092@gmail.com>