Title: XML translation - Doctype statement turns < and > characters into entity characters · Issue #143 · DeepL/deepl-python · GitHub
Open Graph Title: XML translation - Doctype statement turns < and > characters into entity characters · Issue #143 · DeepL/deepl-python
X Title: XML translation - Doctype statement turns < and > characters into entity characters · Issue #143 · DeepL/deepl-python
Description: When translating XML documents, the doctype statement is not properly handled. The less than and greater than characters surrounding the DOCTYPE statement are being converted to entities: Before translation:
Open Graph Description: When translating XML documents, the doctype statement is not properly handled. The less than and greater than characters surrounding the DOCTYPE statement are being converted to entities: Before tr...
X Description: When translating XML documents, the doctype statement is not properly handled. The less than and greater than characters surrounding the DOCTYPE statement are being converted to entities: Before tr...
Opengraph URL: https://github.com/DeepL/deepl-python/issues/143
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"XML translation - Doctype statement turns \u003c and \u003e characters into entity characters","articleBody":"When translating XML documents, the doctype statement is not properly handled. The less than and greater than characters surrounding the DOCTYPE statement are being converted to entities:\n\nBefore translation:\n\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE dmodule[\n\t\u003c!NOTATION cgm PUBLIC \"-//USA-DOD//NOTATION Computer Graphics Metafile//EN\"\u003e\n\t\u003c!ENTITY ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1 SYSTEM \"ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1.CGM\" NDATA cgm \u003e\n]\u003e\n\nAfter translation:\n\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u0026lt;!DOCTYPE dmodule[\n \u003c!NOTATION cgm PUBLIC \"-//USA-DOD//NOTATION Computer Graphics Metafile//EN\"\u003e\n\t\u003c!ENTITY ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1 SYSTEM \"ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1.CGM\" NDATA cgm \u003e ]\u0026gt;\n\nCode:\n\n result = deepl_client.translate_text(\n text,\n tag_handling=\"xml\",\n source_lang=\"SV\",\n target_lang=\"EN-GB\",\n model_type=\"prefer_quality_optimized\",\n non_splitting_tags=\"div\",\n split_sentences=\"nonewlines\"\n )\n\nI have heard that DeepL is working on improving the tag handling, is there an expected timeframe for this?\n\nAny settings that could help improve this situation?\n","author":{"url":"https://github.com/matsbert","@type":"Person","name":"matsbert"},"datePublished":"2025-09-01T11:32:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/143/deepl-python/issues/143"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:34dc690f-f191-4f15-2fca-9fe979cfa2bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B674:79F9B:969B9B:D1471A:6A4C99E6 |
| html-safe-nonce | eaed99c8b492671030896c87404e35ee9c9ae74cfef71bd5fe3bb0d00097747b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjc0Ojc5RjlCOjk2OUI5QjpEMTQ3MUE6NkE0Qzk5RTYiLCJ2aXNpdG9yX2lkIjoiNjc4NjU4MDU4MzI4NTU2MTgzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 21186d4a35989c0978f0ee105a62220fe7274dd47b7724de52e5a44f4b3481a9 |
| hovercard-subject-tag | issue:3372329001 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DeepL/deepl-python/143/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fbd535002c20001d7e7743711499fe93ccf41731410cdab2b5726ec5c645a748/DeepL/deepl-python/issues/143 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fbd535002c20001d7e7743711499fe93ccf41731410cdab2b5726ec5c645a748/DeepL/deepl-python/issues/143 |
| og:image:alt | When translating XML documents, the doctype statement is not properly handled. The less than and greater than characters surrounding the DOCTYPE statement are being converted to entities: Before tr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | matsbert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/DeepL/deepl-python git https://github.com/DeepL/deepl-python.git |
| octolytics-dimension-user_id | 83310993 |
| octolytics-dimension-user_login | DeepL |
| octolytics-dimension-repository_id | 387469387 |
| octolytics-dimension-repository_nwo | DeepL/deepl-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 387469387 |
| octolytics-dimension-repository_network_root_nwo | DeepL/deepl-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width