mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
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:
parent
ad45145a20
commit
f2c715aaa0
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue