Editor: German special characters converted into html special characters

Editor: German special characters converted into html special characters

FeraudFeraud Posts: 20Questions: 6Answers: 0

Hi,

when persisting a string in German like this "100 Stück" (= 100 pieces) the persisted string is 100 Stück. I am searching for way to tell to tell the editor or whatever object it needs not to do this conversion. Sql-Server data column is NVARCHAR and can persist German special characters.

I am using C# / WebApi 2 / Sql Server. Any idea?

Thank you!

Answers

  • FeraudFeraud Posts: 20Questions: 6Answers: 0

    Right now, I am using a workaround by manually converting the html-encoded string like

    result.Content.data[0]["Comment"] = WebUtility.HtmlDecode(result.Content.data[0]["Comment"].ToString());

    But it feels like a workaround. I'd prefer some options to set somewhere.

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

    Hi,

    Do you mean that when you write it to the database it is being automatically HTML entity encoded? Try adding .Xss(false) to the field definition. I suspect that might be caused by the Microsoft XSS filter.

    Allan

This discussion has been closed.