Random text is getting dropped from Wikipedia oneboxes. See this example. Screenshot:


This occurs regardless of HTTP/HTTPS and of whether a redirect URL is entered into chat.

I initially thought the bug is triggered by <span>s or other HTML formatting elements, but in the Burj Khalifa article's HTML source code, there is no formatting around one of the deleted words.

Possibly related to Numbers mysteriously stripped from inlined Wikipedia articles in chat, but this is not specific to numbers.


It seems to me this is because the onebox reads the wikitext of the page and then ignores any templates or special markup.

So, for example:

{{Nihongo|'''Mount Fuji'''|富士山|Fuji-san|extra={{IPA-ja|ɸɯꜜdʑisaɴ|IPA|Fuji-san.ogg}}}}, located on Honshu Island, is the highest [[mountain]] in [[Japan]] at {{Convert|3776.24|m|ft|0|abbr=on}}.

is rendered as:

, located on Honshu Island, is the highest mountain in Japan at .

which is consistent with the results you're getting.

One solution would be to let MediaWiki parse the wikicode into HTML (the API can do that) and then strip some of the HTML to get the wanted plaintext.


Thanks to a recent addition to Wikipedia's API, this is now fixed:

  • Oh, by the way, if you're looking into Wiki one-boxes and have a bit more time, do you think we could do something with the API for returning the best image? I know you don't think it is very urgent (from that old Meta question), but maybe the Wiki API for the image is easy to implement? mediawiki.org/wiki/Extension%3aPageImages It sure would make us dance in exhilaration! – Cerberus_Reinstate-Monica Jul 21 '14 at 14:12
  • @Cerberus See my updated answer here. – balpha Jul 21 '14 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .