added custom method to encode user input to prevent xss but not encode unicode chars (closes #76)