js/plugins/drupalentity/plugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js index a6ad599..f56d57f 100644 --- a/js/plugins/drupalentity/plugin.js +++ b/js/plugins/drupalentity/plugin.js @@ -140,7 +140,7 @@ parts: { entity: 'drupal-entity' // parts#caption is not set because it's not a separate HTML element when downcasted, just an attribute. - // parts#link defined in widget#init + // parts#link is not set but defined in widget#init because it wraps the downcasted widget HTML. }, upcast: function (element, data) { @@ -215,6 +215,9 @@ if (dataToHash.attributes['data-caption']) { delete dataToHash.attributes['data-caption']; } + if (dataToHash.link && dataToHash.link.href) { + delete dataToHash.link.href; + } return JSON.stringify(dataToHash); },