From c485bd4fcee2f00f750be22a6ecbbe49a265b3fb Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 24 Mar 2017 18:52:12 +0000 Subject: [PATCH] Apply the 'external' link class hack to MWPreviewElement Change-Id: I3ccea9a72f812e73bdc4d8d34635671dfd493be4 --- modules/ve-mw/ui/elements/ve.ui.MWPreviewElement.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/ve-mw/ui/elements/ve.ui.MWPreviewElement.js b/modules/ve-mw/ui/elements/ve.ui.MWPreviewElement.js index 34bea10c36..6d39533c3f 100644 --- a/modules/ve-mw/ui/elements/ve.ui.MWPreviewElement.js +++ b/modules/ve-mw/ui/elements/ve.ui.MWPreviewElement.js @@ -26,3 +26,16 @@ ve.ui.MWPreviewElement = function VeUiMwPreviewElement() { /* Inheritance */ OO.inheritClass( ve.ui.MWPreviewElement, ve.ui.PreviewElement ); + +/* Method */ + +/** + * @inheritdoc + */ +ve.ui.MWPreviewElement.prototype.replaceWithModelDom = function () { + // Parent method + ve.ui.MWPreviewElement.super.prototype.replaceWithModelDom.apply( this, arguments ); + + // TODO: Remove when fixed upstream in Parsoid (T58756) + this.$element.find( 'a[rel="mw:ExtLink"]' ).addClass( 'external' ); +};