mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
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:
parent
273995058e
commit
ec2bff5535
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue