Looking at Wikipedia's spam blacklist, the line that's causing this message is the following regular expression:
\b[_\-0-9a-z]+\.onion\b # was \bsilkroad.*\.onion\b
(Essentially, match any URL with a string of alphanumeric characters followed by ".onion" followed by a word boundary.)
So the suggestion in the question that all .onion links are blacklisted on Wikipedia is correct. The comment next to the regular expression shows that it was previously just Silk Road that was blacklisted. At this stage of my research, I too was wondering if it was blacklisted because of the site's content.
There's been lots of discussion on Wikipedia as to whether Tor URLs should be included or not. This article, "Silk Road Wiki Wars", summarises the reasons that were raised for not linking to Silk Road specifically (some of which are more valid than others, and some of which don't apply to other Tor sites; the article does say that the final reason behind the ban was "murky"):
- Linking to this site would expose Wikimedia Foundation to legal liability (with linking to such sites illegal in some jurisdictions)
- The true link is hard to distinguish from fake phishing links, and is therefore prone to being changed, and harming Wikipedia’s readers
- Hosting the link does a disservice to Wikipedia’s readers (i.e. there’s a duty not to send readers to websites where they might be able to commit crimes).
- Linking to this site is spam or otherwise violates WP:ELNO [Wikipedia’s guidelines on external links to be avoided]
- Hidden site (.onion) addresses are not regular links and require special software
- It’s against Wikipedia’s rules to insert links to blacklisted sites (a purely technical objection, since the link had only been blacklisted because of previous editing wars)
Having looked at a couple of other more general debates about linking to .onion URLS, it looks like the only real policy that clearly, objectively blocks Tor (and not just Silk Road) is external links to be avoided policy 7: "Except for a link to an official page of the article's subject, one should generally avoid providing external links to sites that are inaccessible to a substantial number of users, such as sites that only work with a specific browser or in a specific country."
Given the controversy there's been in the Wikipedia community in the past about linking to Silk Road, it's possible that people are enforcing letter of-the-law use of this policy for reasons of censorship or misconceptions about Tor, although this is speculation on my part.
Because the above regex includes any site with the string ".onion" next to a word boundary, it also (hilariously) stops links to innocuous Surface Web sites like http://www.onion-router.net/. And because of its catch-all nature, it still blocks links that come under the "official page of the article's subject" exception.
One workaround is to link to a Tor2Web (or similar) version of a page (as long as the proxied version doesn't still contain ".onion" in the URL). This avoids the "sites that only work with a specific browser" rule. I did this 3 weeks ago to link to the official Hidden Wiki page and no-one seems to have minded.