Title: The translation of HTML code containing comments fails · Issue #157 · DeepL/deepl-python · GitHub
Open Graph Title: The translation of HTML code containing comments fails · Issue #157 · DeepL/deepl-python
X Title: The translation of HTML code containing comments fails · Issue #157 · DeepL/deepl-python
Description: When I translate HTML code that contains HTML comment Deepl throws an exception : Bad request, message: Tag handling parsing failed, please check input. 'text without parent' If I remove the HTML comment the translation is done successfu...
Open Graph Description: When I translate HTML code that contains HTML comment Deepl throws an exception : Bad request, message: Tag handling parsing failed, please check input. 'text without parent' If I remove the HTML c...
X Description: When I translate HTML code that contains HTML comment Deepl throws an exception : Bad request, message: Tag handling parsing failed, please check input. 'text without parent' If I remove th...
Opengraph URL: https://github.com/DeepL/deepl-python/issues/157
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The translation of HTML code containing comments fails","articleBody":"When I translate HTML code that contains HTML comment Deepl throws an exception : \n```\nBad request, message: Tag handling parsing failed, please check input.\n'text without parent'\n```\n\nIf I remove the HTML comment the translation is done successfully. Also with tag_handling_version parameters set to \"v1\" no errors are thrown. \n\n```py\ntext = \"\"\"\n\u003c!-- this is a comment --\u003e\n\u003cp\u003ea paragraph\u003c/p\u003e\n\u003cp\u003eanother\u003c/p\u003e\n\"\"\"\ntranslator = deepl.Translator(key)\nresult = translator.translate_text(\n text,\n source_lang=\"EN\",\n target_lang=\"FR\",\n tag_handling=\"html\",\n tag_handling_version=\"v2\",\n)\n```\n\ncurrent version of deepl-python is 1.28.0 ","author":{"url":"https://github.com/bibich","@type":"Person","name":"bibich"},"datePublished":"2026-03-16T10:10:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/157/deepl-python/issues/157"}
| 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:6b534bad-3f7c-d021-3b0e-20d7445075ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E4A:1EE8:DBDC55:13DFE14:6A4D0F1A |
| html-safe-nonce | e8cc7b2d3d58715b310225d4d74e11f1c16aba52934e0720d370477f0cd47de4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTRBOjFFRTg6REJEQzU1OjEzREZFMTQ6NkE0RDBGMUEiLCJ2aXNpdG9yX2lkIjoiMjE0ODIzMzY0MTI2NzYyOTg1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5b6a3212e16c37da736804d1ac4d093931d57eb18a0b6806d4b0064a63a41dbb |
| hovercard-subject-tag | issue:4081516691 |
| 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/157/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9791dcc87a40600e0d0ab7b693dab2fb00d84f4f80fda8512ca5c0c5475ba1a4/DeepL/deepl-python/issues/157 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9791dcc87a40600e0d0ab7b693dab2fb00d84f4f80fda8512ca5c0c5475ba1a4/DeepL/deepl-python/issues/157 |
| og:image:alt | When I translate HTML code that contains HTML comment Deepl throws an exception : Bad request, message: Tag handling parsing failed, please check input. 'text without parent' If I remove the HTML c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bibich |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| 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 | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width