When I turn on content translation, and check off "Content" at /admin/config/regional/content-language, I get markup appearing on the page by the node revision settings. A screenshot is attached.

Comments

davidhernandez’s picture

Issue summary: View changes
olli’s picture

Issue tags: +SafeMarkup

I think this is coming from ContentTranslationHandler::addTranslatabilityClue():

      $suffix = ' <span class="translation-entity-all-languages">(' . t('all languages') . ')</span>';
...
      $element['#title'] .= $suffix;
matsbla’s picture

Status: Active » Closed (duplicate)
Related issues: +#2532284: HTML is escaped in "all languages" in UI after SafeMarkup change

I guess this is a duplicate

olli’s picture

I agree, thanks!

urashima82’s picture

Hi ! I have the same problem with button link "Delete" that redirect to node/{nid}/delete.

Here is my patch that seems to solve this.

Regards.

urashima82’s picture

Version: 8.0.x-dev » 8.8.5
Status: Closed (duplicate) » Needs review
ericdsd’s picture

patch #5 work on 8.8.6 too

Version: 8.8.5 » 8.8.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

marcoscano’s picture

Patch #5 applies to 9.2.2 and works as expected for us, on the "Delete (all languages)" link when editing a node with translations.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +Needs Review Queue Initiative, +Needs steps to reproduce

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

Tried replicating on Drupal 10.1 with Umani install and I do not see the markup

If still valid please provide testing steps.

rob230’s picture

It does seem like it's way too aggressive. We have this unescaped HTML <span class="translation-entity-all-languages"> appearing at the end of many buttons and other form elements of a multilingual site.

For example, even something as simple as a link inside a container gets it added. The fix is to add '#multilingual' => TRUE to the container or the element, which will remove it altogether. But the patch #5 will also fix it, and makes sense - what Drupal core is currently doing is incorrect because it is appending some HTML to a string that gets escaped.

rob230’s picture

Another place it will appear is in the error message for a required field - even if the field itself displays correctly, the title (with suffix) gets escaped in the error message about the required field.

The best thing might be to remove the spans, because the #title of an element is used as a string in so many places.

rob230’s picture

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

I also could not reproduce the problem stated in the issue summary. And there is a separate issue for a problem with fields. so, closing this one.