About this question
I have a text field that allows the user to type whatever the user wants. After saving, the results are later displayed on the screen to potentially to a large audience. XSS seems a bit like black magic to me, so I am wondering what the current XXS best practices are for handling this situation (from specific ways to sanitize input to specific ways to encode HTML to display)?