But it might be dangerous.
There are a couple of ways that user input could be "dangerous".
The most common (and apparently the focus of the discussion you linked to) is when user input is used as part of a database query in your server program.
YOU SHOULD NEVER USE USER INPUT AS PART OF A DATABASE QUERY!
Some developers might try to "sanitize" user input to remove any characters that would allow an attacker to essentially "rewrite" the database query to do dastardly deeds. IMO, it's the wrong way. But... if you must... it MUST be done on the server side. Doing it in the browser with Javascript just makes one more easy step for the wily hacker.
The RIGHT way - possible in any decent database SDK - is to separate the SQL from the data by using placeholders in the SQL - e.g. $1, $2, etc., and supplying the user input as parameters. I can't tell you how to do that in Microsoft MVC, though, as I don't use it. (I could tell you how to do it in Ruby with Sequel, but that will do you no good...) Then there is no "sanitization" needed.
NEVER paste together SQL fragments with user input!
what I try to do now is to replace dangerous chars, and to replace them back on the server
Then you are just adding-back the danger! They become dangerous when you paste the text into a database query.
---
Another way that user input - specifically in this context - might be "dangerous" is that the user might embed some Javascript in the HTML, and then if the purpose of your site is to then show that HTML to other users, then the Javascript would be run in their browser - unless you sanitize it by removing the Javascript. There can be similar issues with CSS. (They might include CSS that might hide something on your page to some evil end.)
Again, if you have to "sanitize" your HTML for that purpose, you must do it on the server, or you have only placed a minor barrier in front of a hacker by doing it in Javascript in the browser.
But, from the context of your posts, I assume the issue is the first kind of danger I mentioned above.