Refactor the code with pylint advices.
Add try-except statement to catch errors.
Add alias to language name. Catch invalid args error.
Use html module to escape &, <, >, ", and '.