I am using very simple Text Translation Service but my input is "HTML" string and when the response is returned successfully the inline html text and style attributes are misplaced. Not sure why is happening. I also tried using the same HTML input (checked XML parsing correctness for the input HTML) to directly call the API without any proxy code through postman, still it is the same issue and the text as well as tags are misplaced here and there. Please help.
API Call:
https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es&textType=html"
Input Payload:
[{text: "<div class=\"customClassCode\"><p><span class=\"ql-size-xlargeplus\" style=\"background-color: rgb(0, 128, 128);\">Simple text should be displayed and translated to the </span><a href=\"https://www.google.com\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"ql-size-xlargeplus\" style=\"background-color: rgb(0, 128, 128);\">new that</a><span class=\"ql-size-xlargeplus\" style=\"background-color: rgb(0, 128, 128);\"> were choosenHow we need to understand that it is so bad experience</span></p></div>"}]
Response (After Success from Text Translator Azure Cognitive Services)
<div class="customClassCode"><p><span class="ql-size-xlargeplus" style="background-color: rgb(0, 128, 128);">El texto simple debe mostrarse y traducirse a los </span><a href="https://www.google.com" rel="noopener noreferrer" target="_blank" class="ql-size-xlargeplus" style="background-color: rgb(0, 128, 128);">nuevos</a> que <span class="ql-size-xlargeplus" style="background-color: rgb(0, 128, 128);"> se eligieronCómo debemos entender que es una experiencia tan mala</span></p></div>
ISSUE: Line from response where it mentions "nuevos</a> que" format, should be "nuevos que</a>" (all inside anchor tag) based on the input text and this is not happening for some strange reason.