Help:Lint errors/wikilink-in-extlink

Other languages:

This linter error is reported when a wikilink is used inside an external link. This usage is not semantically correct and will not render as expected since it is not possible to nest a link inside a link.


[ This is [[Google]]'s search page]

The generated HTML for this is:

<a rel="nofollow" class="external text" href="">This is </a><a href="Google" title="Google">Google</a>'s search page

As you see, the HTML output has a pair of links adjacent to each other, the first one being an external link and the second one a wiki link and includes text that is not linked at all. Presumably, this output is not what editors intended and the wikitext needs to be fixed to remove the semantically incorrect link nesting.

How to fix[edit]

Typical fixes:

  • Remove the square brackets from the non-working wikilink. In the example above, that would look like: [ This is Google's search page]
  • Move the wikilink outside of the single square brackets that form the external link for the URL. This may require some minor copy editing so that that resulting text and links make sense. In the example above, that might look like: [ This] is [[Google]]'s search page
  • Sometimes this error is caused by a template like {{sic}} or {{Dead link}} placed inside of a URL title. To fix this error, move the template outside of the wikitext that creates the URL link.