Fixed htmlEncode and htmlDecode