diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js index 8c63f7a2fc..7f07ab37e9 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js @@ -104,11 +104,8 @@ ve.dm.MWExtensionNode.static.toDomElements = function ( dataElement, doc, conver } } if ( converter.isForClipboard() ) { - // Resolve image sources - $( els ).find( 'img' ).addBack( 'img' ).each( function () { - var $this = $( this ); - $this.attr( 'src', ve.resolveUrl( $this.attr( 'src' ), doc ) ); - } ); + // Resolve attributes + ve.resolveAttributes( $( els ), doc, ve.dm.Converter.computedAttributes ); } return els; }; diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js index 4d5f075df1..effc6022e2 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js @@ -184,11 +184,8 @@ ve.dm.MWTransclusionNode.static.toDomElements = function ( dataElement, doc, con els[ i ].setAttribute( 'data-ve-ignore', 'true' ); } - // Resolve image sources - $( els ).find( 'img' ).addBack( 'img' ).each( function () { - var $this = $( this ); - $this.attr( 'src', ve.resolveUrl( $this.attr( 'src' ), doc ) ); - } ); + // Resolve attributes + ve.resolveAttributes( $( els ), doc, ve.dm.Converter.computedAttributes ); } return els; };