gnosygnu / xowa

xowa offline wiki application
Other
374 stars 42 forks source link

en.wikipedia.org/wiki/Wozzeck bad wikitext translation #261

Open desb42 opened 5 years ago

desb42 commented 5 years ago

I was looking at pages with \<score> in them and then I cam across this wozzeck

In the infobox is [[Emil Stumpp]]"> which should not be there The wikitext is {{nowrap|[[Emil Stumpp]]}} I have looked at some other {{nowrap and not found any others that seem to cause the same effect I suspect yet another edge case

desb42 commented 5 years ago

On further examination, this particular problem seems to stem from what I think of as a bug in Template:Infobox_opera

From lines 12-16

| subheaderstyle  = font-weight: bold;

{{{Caption|{{{image caption|{{{caption|{{{image_caption|}}}}}}}}}}}}

| image           = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}}

What this effectively does is append the caption to the subheaderstyle (I dont know why)

Now in this particular case the caption has a nowrap template around an internal link. The nowrap template translates (transcludes) to a \<span class="nowrap">\</span> section

So you get a td' element that looks like

<td colspan="2" style="text-align:center;font-weight: bold; Sketch of the composer by <span class="nospan">[[Emil Stumpp]]</nospan>" ...

jtidy then tries to clean this up - hence the visual effect.

<td colspan="2" style="text-align:center;font-weight: bold; Sketch of the composer by &lt;span class=">
      [[Emil Stumpp]]"&gt; ...

The en.wikipedia version produces the following

<td colspan="2" style="text-align:center;font-weight: bold; Sketch of the composer by &lt;span class=&quot;nowrap&quot;&gt;&#91;&#91;Emil Stumpp&#93;&#93;&lt;/span&gt;"> ...

It could be argued that it is a jtidy artefact but I think its a enwiki template bug