HomePhabricator

Fix WikiLinkPrefixer duplicating multi-part prefixes

Authored by thiemowmde on Sep 30 2019, 3:03 PM.

Description

Fix WikiLinkPrefixer duplicating multi-part prefixes

The existing check in line #62 only works for 1-element prefixes. There
was no special case in place for multi-part prefixes. An existing link
[[w:de:…]] on the German Wikipedia that points to the German Wikipedia
would become [[:w:de:w:de:…]] during transfer. This should be a super-rare
edge-case, but was reported already.

Bug: T232312
Change-Id: I3e1e19b320e726a86b8e3b458991e32a62baeadb

Details