Last modified: 2010-05-15 15:37:58 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 3117 - ImagePage.php adds linebreaks at the size/mime line
ImagePage.php adds linebreaks at the size/mime line
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Brion Vibber
Depends on:
  Show dependency treegraph
Reported: 2005-08-11 16:57 UTC by Benjamin West
Modified: 2010-05-15 15:37 UTC (History)
1 user (show)

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


Description Benjamin West 2005-08-11 16:57:24 UTC
10:18 < Duesentrieb> the page is generated by ImagePage.php, lines 209 and 233
10:42 < mrgenixus> Duesentrieb noticed an error on page
                   with the mime reporting and I thik the problem is that the
                   $wgOut->addwikiText() needs the false parameter in lines
                   IIIII$wgOut->addHTML("<span class=\"fileInfo\"> (");
10:42 < mrgenixus> IIIII$wgOut->addWikiText( $info, false );
10:42 < mrgenixus> IIIII$wgOut->addHTML(")</span>");
10:42 < mrgenixus> oh,
10:42 < mrgenixus> nm
10:42 < mrgenixus> it's already there
10:42 < mrgenixus> but it doesn't work

error seems to be in parser.php, I think
$linestart is passed all the way to parse();
Comment 1 Daniel Kinzler 2005-08-11 17:43:01 UTC
The effect of this can be seen on "Image:" pages for non-images, like this one:
<>: the file-size
and mime-type in the perentecies should be inlined. The message comes from
MediaWiki:Fileinfo, no linebreaks are defined there.

The generated HTML looks like this: 
 <span class="fileInfo"> (<p>622KB, MIME type:
The question is: where do the <p> tags come from? The "newline" parameter of
addWikitext should suppress those, right?
Comment 2 Daniel Kinzler 2005-08-11 17:52:05 UTC
I just installed the current HEAD - seems to work fine. So, the fix (whatever it
was) needs to be backported to 1.5 and applied to the live sites. This is a
little annoying on the commons, etc
Comment 3 Daniel Kinzler 2005-08-11 18:22:03 UTC
Update: I was unable to find a difference between 1.5alpha4 and HEAD that would
explain why it's working now. Avar suggested that this problem may be caused by
html-tidy. This needs some more investigation, i guess...
Comment 4 Daniel Kinzler 2005-08-11 18:58:12 UTC
Ok, I found the reason for this: tidy is applied individually to messages added
via addWikiText(). Tidy inserts <p> tags if there is not block element wrapping
the input. It would be much better to apply tidy only once, see bug #3119.
Comment 5 Brion Vibber 2005-08-12 04:31:08 UTC
The tidy bit is correct behavior; wiki text blocks are blocks, and should be output whole.
Comment 6 Brion Vibber 2005-08-12 04:54:05 UTC
Fix applied to HEAD and REL1_5:
* (bug 3117) Fix display of upload size and type with tidy on

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