Textarea doesn’t display the encoded output correctly

I get user input from textarea and handle it on the server where it’s encoded with base64 and stored in a database, but for some reason there seems to be an encoding error when loading that content back into a textarea.

The problem is that i my case quotation marks ' and " get encoded by the form but when i display my text again the encoding remains. (it looks like sometext'moretext instead of sometext'moretext) I wonder how can i decode the values to display correctly again.

I tried decodeURIcomponent() but it didn’t work. I use razor pages and load data into textarea using asp-for="" directive.