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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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