Apply the 'external' link class hack to MWPreviewElement

Change-Id: I3ccea9a72f812e73bdc4d8d34635671dfd493be4
This commit is contained in:
Ed Sanders 2017-03-24 18:52:12 +00:00
parent 0bb9bd5aa3
commit c485bd4fce

View file

@ -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' );
};