Last modified: 2008-01-09 01:25:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14544, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12544 - Stray apostrophe in template renderer
Stray apostrophe in template renderer
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-08 08:57 UTC by Timwi
Modified: 2008-01-09 01:25 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Timwi 2008-01-08 08:57:00 UTC
See: http://en.wikipedia.org/wiki/Nazareth

Notice the stray apostrophe underneath the image in the infobox on the right.

The template in question is: http://en.wikipedia.org/wiki/Template:Infobox_Israel_muni

I've experimented with it a bit and it seems that the apostrophe is generated by this line:

{{!}} style="vertical-align: middle; {{#if:{{{image2|}}}|padding-right:3px}}" align="center" {{!}} [[Image:{{{image<noinclude>{{!}}Placeholder.png</noinclude>}}}{{#if:{{{imgsize|}}}|{{!}}{{{imgsize}}}px}}<noinclude>{{!}}230px</noinclude>]]<br />''{{{caption| }}}''

The code -> ''{{{caption| }}}'' <- appears to be rendered as an apostrophe if an image but no caption is given. If no image is given, or a caption is given, or both, the bug does not occur.
Comment 1 Tim Starling 2008-01-09 01:25:14 UTC
In the template invocation, you had caption set to an empty string, it wasn't missing altogether. Thus ''{{caption| }}'' was expanded to '''', not '' ''. '''' is interpreted as an apostrophe plus a switch to bold. There are many possible fixes for this, and I have implemented one of them in the template.

Not a MediaWiki bug: {{test|x=}} will cause {{{x|default}}} to give an empty string, not "default". This is appropriate and stable behaviour. 

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links