I'm going to be developing a single page JavaScript app which allows input via a textarea. This input is never sent to the server, never shown to another user, and will only be persisted in browser memory as long as they are on the page. Any input will need to be redisplayed to the user who has entered it.
- What attack vectors are there in this kind of scenario?
- What would you do to mitigate any attack vectors?
Options to me seem to be dumb JavaScript HTML encoding before adding to the DOM or simply keeping the textual input in the textarea as is and disabling it.