Issue #2768711: Format title attribute in ContentTranslationHandler.php
Problem
On multilingual sites, fields marked as non-translatable can produce error messages where HTML is escaped. For example, a user image field shows escaped tags in the error summary.
Proposed resolution
Use FormattableMarkup when setting $element['#title'] to ensure HTML in field labels is rendered instead of escaped.
Implementation details
element['#title'] = new FormattableMarkup(
element['#title'] . $suffix, []);
Testing instructions
You should have a multilingual site.
- Create if you don't have an image field in the user entity.
- Mark the field as non-translatable.
- Set a max file size for the image field.
- Try to upload a larger size image to trigger the error.
The error message should display the field label with rendered HTML, not escaped.