Asian characters are saved as encoded uncode number in ASP.NET MVC.

Asian characters are saved as encoded uncode number in ASP.NET MVC.

jslovesjsloves Posts: 2Questions: 0Answers: 0

Hi,

I tested Chinese, Japanese or Korean. All saved such as "&# 26085;&# 26412;&# 35486;&# 12391;"
Even those are displayed corrected in the table, but not possible to be edited later.

I created a test env. as below. I just download ASP.NET MVC source from here and nothing changed.
And use MS SQL DB for this.

http://testenvjs.azurewebsites.net/Web/examples/simple/simple.html

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    This is unfortunately a side effect of the XSS protection that is used in Editor's .NET libraries (the Microsoft XSS library). If you disable that for your fields (.Xss( false )) does it then work as expected? If so, you can use a renderer to prevent XSS attacks on output.

    Regards,
    Allan

  • jslovesjsloves Posts: 2Questions: 0Answers: 0

    Thank you it works as expected when I disable Xss protection.

This discussion has been closed.