Html Encode String Javascript Functions