HTML Tags visible with OpenAI translation via Drupal AI

Created on 7 June 2025, about 2 months ago

Problem/Motivation

When translating a larger number of nodes with a formatted long text field, some translations sporadically display HTML tags. For instance, when translating 10 nodes with longish formatted text, approximately 1-2 will exhibit this issue.

If I delete and re-translate, the issue is frequently but not always resolved. This makes it difficult to pinpoint, as it's not consistently reproducible even when translating the same node multiple times. However, it consistently affects some of the translations, regardless of whether the formatted long text field is directly in a node or embedded within a paragraph.

This happens with Open AI translation, which I use through the Drupal AI. I tried to reproduce it with DeepL, but even with 50 translated nodes, it did not occur.

I attach a screenshot with an example. Please ask, if I can provide more information.

Steps to reproduce

  • create a node type with a formatted long text field
  • make the node type and field translatable
  • create 10 or more nodes of this type and fill the fields with long formatted texts of several paragraphs (I mean text paragraphs with the < p > HTML tag) and possibly some lists.
  • translate all of them per batch
  • check the translations, some of them display HTML tags
🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇩🇪Germany Martin Mayer Germany and Philippines

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024