There seem to be special unicode characters in the response from the backend that break javascript. This is also notable in the node-osrm package that, as of not too long ago, seems to break with an "Unexpected end of input" error when parsing the result from the backend.
I've already tried to replace all U+2028 and U+2029 characters in JavaScript, as recommended here
http://timelessrepo.com/json-isnt-a-javascript-subset, but this didn't solve the issue. I still get "SyntaxError: Unexpected token" when trying to parse the response from the backend into a JSON object.
There seem to be special unicode characters in the response from the backend that break javascript. This is also notable in the node-osrm package that, as of not too long ago, seems to break with an "Unexpected end of input" error when parsing the result from the backend.
I've already tried to replace all U+2028 and U+2029 characters in JavaScript, as recommended here
http://timelessrepo.com/json-isnt-a-javascript-subset, but this didn't solve the issue. I still get "SyntaxError: Unexpected token" when trying to parse the response from the backend into a JSON object.