Microsoft Edge passing strange characters in AJAX call

2

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

dataistheparameterthatcomeswiththeAjaxcall.WhenItestinChromeoranyotherbrowser,itworksperfectly.ButmyclientusesEdge,andwhenIwenttestingonit,thisDatetime.ParsefailedwithSystem.FormatException.

LookatthetestsIdid:

  • 01/01/2019->ThatdateIcopiedfromthedebuggerwhenIcalledthroughChrome,thenpasted on that site. The output was:

  • 01/01/2019-ThisisthevaluethatcomesinthedebuggerwhenItestthroughMicrosoftEdge.Seetheoutputofthesamesite:

If you select the dates I put there and paste it to the same site, you may see the same result. Although the dates look identical, there are apparently strange hidden characters in the one that the Edge passes in the call Ajax!

What's happening? How can I resolve?

    
asked by anonymous 11.05.2018 / 21:29

1 answer

3

This is known behavior .

Edge includes, in its data-processing chain, a parser that identifies the date format by default ECMA-402 and includes special characters like LTR and RTL .

This no is a default behavior between browsers.

You will need to include a parser in your evaluation chain that deletes directional marking content.

    
11.05.2018 / 21:52