From 8855ebf58681d77a5d0afc8c9b400401443ef8b5 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Mon, 25 Jul 2016 20:04:04 +0100 Subject: [PATCH] Fix check for non-template-namespace transclusions These are not just titles beginning with ':' Change-Id: I9d7063c221561a0e582deb6944eaab6d9ab4e3f7 --- modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js index 72da8f3a45..1b020c9228 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js @@ -250,6 +250,7 @@ /** */ ve.dm.MWTransclusionModel.prototype.fetch = function () { var i, len, item, title, queue, + templateNamespaceId = mw.config.get( 'wgNamespaceIds' ).template, titles = [], specs = {}; @@ -271,7 +272,10 @@ // Skip titles that don't have a resolvable href title && // Skip titles outside the template namespace - title.charAt( 0 ) !== ':' && + mw.Title.newFromText( + title, + templateNamespaceId + ).namespace === templateNamespaceId && // Skip already cached data !hasOwn.call( specCache, title ) && // Skip duplicate titles in the same batch