Page MenuHomePhabricator

Tidy fails silently if missing, documentation out of date
Closed, ResolvedPublic

Description

The following input is not fixed and causes page layout to explode:

<big><big><big>ܫܠܡܐ ܘܐܝܩܪܐ
<big><big>Hello!
<big><big>اهلا وسهلا

In the source code it reads:
<!-- Tidy found serious XHTML errors -->


Version: 1.18.x
Severity: critical
URL: http://translatewiki.net/w/i.php?title=User:Basharh&oldid=1141250

Details

Reference
bz27889

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:35 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz27889.
bzimport added a subscriber: Unknown Object (MLST).

Not a regression. Started happening after we moved to a newer server with newer PHP.

Works for me with external tidy, version 25 March 2009.

Can be tested with:
<?php
/* Bug 27889 */
require_once( "maintenance/commandLine.inc" );
echo MWTidy::tidy("<big><big><big>ܫܠܡܐ ܘܐܝܩܪܐ
<big><big>Hello!
<big><big>اهلا وسهلا");

I get
<p><big><big><big>ܫܠܡܐ ܘܐܝܩܪܐ <big><big>Hello! <big><big>اهلا وسهلا</big></big></big></big></big></big></big></p>

Meeh. MediaWiki doesn't warn if tidy isn't installed.

(In reply to comment #4)

Meeh. MediaWiki doesn't warn if tidy isn't installed.

That sounds like a bug..

If you didn't have Tidy, where did 'Tidy found serious XHTML errors' message came from?

Now when I installed libtidy and the PHP module with pecl install tidy (not with *pear* as it says everyhere) I get:

Fatal error: Class 'tidy' not found in /www/sandwiki/includes/parser/Tidy.php on line 195

Okay, the PECL is for PHP 4.x only. tidy is now bundled with PHP5 and I can't find any in PEAR. Documentation needs also updating.

(In reply to comment #8)

Okay, the PECL is for PHP 4.x only. tidy is now bundled with PHP5 and I can't
find any in PEAR. Documentation needs also updating.

What still needs updating?

Docs how to install tidy, and have MW complain instead of failing silently?

There were some changes back in r92106.

(In reply to comment #10)

Docs how to install tidy, and have MW complain instead of failing silently?

MW.org? Manual:$wgTidyInternal and Manual:$wgTidy seem OK now.

If you think it's fixed, please close this bug. I'm not going to build an environment without tidy to test this.