diff --git a/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js b/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js index b427020d4d..1df82f4b60 100644 --- a/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js @@ -115,7 +115,11 @@ ve.ui.MWLinkTargetInputWidget.prototype.getLookupMenuItemsFromData = function ( } // Internal link - if ( !pageExists && ( !matchingPages || matchingPages.indexOf( this.value ) === -1 ) ) { + if ( !pageExists && ( !matchingPages || + // Run value through mw.Title to avoid treating a match as a mismatch where + // normalisation would make them matching (bug 48476) + matchingPages.indexOf( new mw.Title( this.value ).toString() ) === -1 + ) ) { items.push( new ve.ui.MenuSectionItemWidget( 'newPage', { '$$': menu$$, 'label': ve.msg( 'visualeditor-linkinspector-suggest-new-page' ) }