I have a .NET backend with a AngularJS frontend. It all works (no JavaScript executed) when a user enters his name as
<script>alert('xss');</script>
The data is sent, as Json, to my backend unencoded, I save the text as entered in the database, and send the text, as Json, unencoded back to the frontend when the data is read.
This all works as said, but watching a security course they advised to encode the Json.
In my case, should I better encode my Json?
This is a part of the Json when saving and loading:
,"aanvragernaam":"<script>alert('xss');</script>","