- Issue created by @achap
When using the entity_embed module alongside this module, WYSIWYG embedded entities that are returned from Google Cloud translate have the
Directly after receiving translation from Google.
<drupal-entity data-entity-type="media" data-entity-uuid="bdf34a77-8019-41f6-8234-9ed11370e3cf" data-embed-button="image_bundle" data-entity-embed-display="entity_reference:entity_reference_entity_view" data-entity-embed-display-settings="{"view_mode":"gallery_full_width_no_thumbnail"}"></drupal-entity>
Directly after running the text through Html::decodeEntities, the html entities are decoded as expected.
<drupal-entity data-entity-type="media" data-entity-uuid="bdf34a77-8019-41f6-8234-9ed11370e3cf" data-embed-button="image_bundle" data-entity-embed-display="entity_reference:entity_reference_entity_view" data-entity-embed-display-settings="{"view_mode":"gallery_full_width_no_thumbnail"}"></drupal-entity>
Now, when you go to view the translation on the node page the FilterHtml is removing it with the Xss:filter even though it is one of the allowed html tags. The end result is that it is like this, and the display-settings are stripped out, so the images render much small than the default translation that hasn't passed through Google translate.
<drupal-entity data-entity-type="media" data-entity-uuid="bdf34a77-8019-41f6-8234-9ed11370e3cf" data-embed-button="image_bundle" data-entity-embed-display="entity_reference:entity_reference_entity_view"></drupal-entity>
I'm currently working around this by re-encoding just the display-settings but I wonder if there is a fix we can apply in the module instead?
* Install entity_embed.
* Set some display settings I guess.
* Use this module to request translation of some content using an embed inside a wysiwyg.
* Notice that the display-settings data attribute it stripped out.
Unsure of the best solution. Open to suggestions.
N/A
N/A
N/A
N/A
Active
1.0
Code