I want to secure some inputs.
For instance, a free textarea where the user could write some sentences in it.
On the server side, I HTML & javascript encode:
_htmlEncoder.Encode(_javascriptEncoder.Encode(input))
But I struggle to make it painless for the user. For instance, If I enter the following french text:
C'est une phrase importante pour moi.
After the encoding, I will get:
C\u0026#x27;est une phrase importante pour moi.
The single quote is encoded. Obviously, I could decode it before but that would make it vulnerable to XSS attacks.
I must have missed something obvious. What options do I have?