Resolve URLs in MWInternalLinkContextItem

Exactly the same change as Ifee722a7f60.
Because we have such excellent code reuse, or something.

Bug: T85622
Change-Id: I18bd5d3923771b6ff149aa589bb2fa23beecf4f5
This commit is contained in:
Roan Kattouw 2015-03-04 17:17:06 +01:00
parent 273995058e
commit ec2bff5535

View file

@ -46,12 +46,13 @@ ve.ui.MWInternalLinkContextItem.prototype.getDescription = function () {
* @inheritdoc
*/
ve.ui.MWInternalLinkContextItem.prototype.renderBody = function () {
var $link = $( '<a>' )
.text( this.getDescription() )
.attr( {
href: this.model.getHref(),
target: '_blank'
} );
var htmlDoc = this.context.getSurface().getModel().getDocument().getHtmlDocument(),
$link = $( '<a>' )
.text( this.getDescription() )
.attr( {
href: ve.resolveUrl( this.model.getHref(), htmlDoc ),
target: '_blank'
} );
this.$body.empty().append( $link );
// Style based on link cache information