Problems with HTML when exporting and importing XLIFF #16014
Unanswered
thomas-louis-osp
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I run a selfhosted version of Weblate (5.8.4) and I have some HTML strings (some of them with entities like   ;). Translation is done externally so we deliver XLIFF to the agency. It now turned out that under some conditions the HTML is converted into entities (e.g. < ;p> ; for "< p >"). This only happens when the HTML string contains Entities like   ;. Any other HTML content is exported with HTML tags. My expectations would be that HTML is securely enclosed in a CDATA section. But the more severe problem is the re-import of the XLIFF files. All strings containing entities or HTML tags are not imported (translation not found). This is a nightmare for us, because we either have to write an importer which uses the API or we have to manually add the translations.
I would like to know if this is a well known problem and if there is a more secure way to export and import HTML content in XLIFF files (I used both variants: XLIFF 1.1 and XLIFF with gettext Extension - no difference)?
Note: I had to put a space before the closing ; of the entities otherwise the entity gets resolved in this topic here
Beta Was this translation helpful? Give feedback.
All reactions