ce.MWTransclusionNode: Clean up href normalization

This became a special case when decodeURIComponentIntoArticleTitle()
was introduced, presumably because we skipped underscore transformation
out of laziness here. It doesn't matter whether we do underscore normalization
because we do title normalization right after, so make this code
less exceptional by using the fully decoded title.

Change-Id: I036cc7f1e08895d36224c94b8edc3ad700af1947
This commit is contained in:
Roan Kattouw 2016-09-18 15:26:01 -07:00 committed by Catrope
parent ad45145a20
commit f2c715aaa0

View file

@ -201,7 +201,7 @@ ve.ce.MWTransclusionNode.prototype.getRenderedDomElements = function ( domElemen
var targetData = ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref(
this.href, transclusionNode.getModelHtmlDocument()
),
normalisedHref = ve.decodeURIComponentIntoArticleTitle( targetData.rawTitle, false );
normalisedHref = targetData.title;
if ( mw.Title.newFromText( normalisedHref ) ) {
normalisedHref = mw.Title.newFromText( normalisedHref ).getPrefixedText();
}