title: Translation by Google Cloud Translate API returns html escaped text
body: <p>In my application, I am trying to translate a few Spanish texts to English using the Google Cloud Translation API. I noticed that the texts that I am receiving after translation is HTML escaped, meaning that <code>"'"</code> appears as <code>"&amp;#39&lt;nospace&gt;;"</code>, <code>"&gt;"</code> appears as <code>"&amp;gt;"</code> and so on.</p>
  
  <p>I have also checked the translation using the rest API via curl script and it gives me the same escaped result -</p>
  
  <pre><code>curl --request GET 'https://translation.googleapis.com/language/translate/v2?key=$GOOGLE_API_KEY&amp;q=Es%20un%20brillante%20d%C3%ADa%20soleado&amp;target=en'
  </code></pre>
  
  <p>The response to this curl is -</p>
  
  <pre><code>    {
    "data": {
      "translations": [
        {
          "translatedText": "It&amp;#39;s a bright sunny day",
          "detectedSourceLanguage": "es"
        }
      ]
    }
  }
  </code></pre>
  
  <p>When I try translating the same Spanish text to English in online google translator (i.e., <a href="https://translate.google.com" rel="nofollow noreferrer">https://translate.google.com</a>), I get the English text as "It's a bright sunny day".</p>
  
  <p><strong>My first question</strong>: Has it been done like that due to some reason or is this a bug?</p>
  
  <p>To unescape the text, I am using <code>org.apache.commons.text.StringEscapeUtils.unescapeHtml4()</code> -</p>
  
  <pre><code>StringEscapeUtils.unescapeHtml4(translation.getTranslatedText());
  </code></pre>
  
  <p><strong>My second question</strong>: Is this the right way of unescaping the translated text?</p>