added input controller
added html encoding to input