diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js index 242cac6c76..8ddfc51607 100644 --- a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js +++ b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js @@ -104,7 +104,11 @@ ve.dm.MWInternalLinkAnnotation.static.getHref = function ( dataElement ) { */ ve.dm.MWInternalLinkAnnotation.static.normalizeTitle = function ( original ) { var title = mw.Title.newFromText( original ); - return title ? title.getPrefixedText() : original; + if ( title ) { + return title.getPrefixedText() + ( title.getFragment() !== null ? '#' + title.getFragment() : '' ); + } else { + return original; + } }; /* Methods */