Last modified: 2014-03-22 00:21:33 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 38800 - Tidy should not create (additional) white space between elements
Tidy should not create (additional) white space between elements
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: 38929 (view as bug list)
Depends on:
Blocks: tidy
  Show dependency treegraph
Reported: 2012-07-29 20:39 UTC by Krinkle
Modified: 2014-03-22 00:21 UTC (History)
8 users (show)

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

Screenshot of Tidy bug (31.86 KB, image/png)
2012-07-29 20:39 UTC, Krinkle

Description Krinkle 2012-07-29 20:39:12 UTC
Created attachment 10902 [details]
Screenshot of Tidy bug

Steps to reproduce:
* Install MediaWiki 1.20alpha + SyntaxHighlight_GeSHi extension
* Make sure $wgUseTidy is not set to true in LocalSettings.php (just in case)
* Create a page with <syntaxhighlight source="php">foo();</syntaxhighlight>
* View source of the saved page:

<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1">foo [..]

The page looks fine.

* Now enable $wgUseTidy (requires that your server has tidy installed)
* View source of the saved page:

<div dir="ltr" class="mw-geshi mw-code mw-content-ltr">
<div class="javascript source-javascript">
<pre class="de1">
foo<span class="br0">( [..]

This is problematic since elements that preserve whitespace (which can be any element, there is no way to tell from the source code - this is determined by css) will now show up to 3 more new lines before the word "foo".

I've been looking around in the Tidy configuration, but can't find a way to disable this.
Comment 1 Marcin Cieślak 2012-07-30 22:26:00 UTC
Can you check if fixes the issue?
Comment 2 Krinkle 2012-07-30 23:03:21 UTC
@Marcin: That is in no way related and will not change the number of actual lines outputted by the Tidy parser. This is a bug in Tidy (or a configuration issue), not in Geshi or MediaWiki core.
Comment 3 Krinkle 2012-08-01 22:56:13 UTC
*** Bug 38929 has been marked as a duplicate of this bug. ***
Comment 4 Tim Starling 2012-08-02 04:34:53 UTC
Can you revert I7eec3ffe and use some non-production wiki for your testing?
Comment 5 Tim Starling 2012-08-02 04:36:46 UTC
I see every computer-related article on Wikipedia is broken. How about I just revert it myself?
Comment 6 Tim Starling 2012-08-02 04:54:35 UTC
Reverted in I1ebe3797 and I1977f093 and deployed. Article display seems to be fixed now.
Comment 7 Krinkle 2012-08-02 06:50:39 UTC
Comment 8 Krinkle 2012-08-02 18:25:20 UTC
*** Bug 38929 has been marked as a duplicate of this bug. ***

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