Problem with charset (Umlaut) in edit form

Problem with charset (Umlaut) in edit form

JPC!JPC! Posts: 13Questions: 2Answers: 0

I am using Editor with DataTables in an ASP.NET Core6 /SQL-Server environment. When trying to edit a datarecord containing text colums with german "umlauts" following happens:


(Umlauts in column "Name 1" are read and displayed correctly from SQL-Server)

After opening the edit form the umlauts are shown like this:

When saving this, the umlauts in SQL-Server will be replaced by the wrong contents displayed in colums "Name 1". If I change the Umlauts in the edit form to ÖÄÜ everything will be saved correctly. Obviously the problem occurs when rendering the edit form.

Would be glad if anybody could help how to fix this.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Hi,

    The .NET XSS protection library from MS is really aggressive in converting non-ASCII characters to HTML entities. What you need to do here is disable the automatic XSS protection on these fields - e.g.

    new Field('name1').Xss(false)
    

    If you do that, you should use the DataTabes text renderer to protect against XSS attacks.

    Allan

  • JPC!JPC! Posts: 13Questions: 2Answers: 0

    Hi Allan,

    thanks a lot for your immediate and helpful answer. Both is highly appreciated :-)

    Works perfectly now!

    Jens

Sign In or Register to comment.