Microsoft Edge passing strange characters in AJAX call

Asked

Viewed 66 times

2

I have an Ajax call on a web system, where you specify a date of dismissal, and fire an employee on that date:

inserir a descrição da imagem aqui

data is the parameter that comes with the Ajax call. When I test in Chrome or any other browser, it works perfectly. But my client uses the Edge, and when I went to test it, this Datetime.Parse failure to System.FormatException.

Look at the tests I’ve done:

  • 01/01/2019 -> This date I copied from Debugger when I made the call through Chrome, then pasted in that site. The output was:

inserir a descrição da imagem aqui

  • 01 / 01 / 2019 - This is the value that comes in Debugger when I test via Microsoft Edge. See the output from the same site:

inserir a descrição da imagem aqui

If you select the dates I put there and paste them into the same site, you can see the same result. Although the dates look identical, apparently there are strange characters hidden in what Edge passes in the so-called Ajax!

What’s going on? How can I solve?

  • @downvoter can comment on the reason for downvote?

1 answer

3


This is a known behavior.

Edge includes, in its data processing chain, a parser which identifies the date format according to the standard ECMA-402 and includes special characters such as LTR and RTL.

This nay is a standard behavior across browsers.

You will need to include a parser that eliminates directional marking content.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.