Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google API converts < and > chars to HTML entities #10

Open
NikolayS opened this issue Oct 20, 2016 · 0 comments
Open

Google API converts < and > chars to HTML entities #10

NikolayS opened this issue Oct 20, 2016 · 0 comments

Comments

@NikolayS
Copy link
Owner

https://www.googleapis.com/language/translate/v2?key=XXXX&source=ru&target=en&q=5%3E2

responds with:

{
 "data": {
  "translations": [
   {
    "translatedText": "5&gt; 2"
   }
  ]
 }
}

> char was converted to its HTML entities plus additional space character.

If 5&gt; 2 comes to input, the response is the same.

This might be unexpected. Backward converting could lead to other caveats/gotchas. So maybe it's worth to leave this as is, just somehow adjust result postprocessing.

@NikolayS NikolayS changed the title Google API converts < and > signs to HTML entities Google API converts < and > chars to HTML entities Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant