Client side html encoding