hi,
I've been using the external tidy and it seems with the tidy.conf in /extensions that a <body> tag is still generated and wrapped around the generated HTML of the article. Is there any way to avoid this?
Thanks, Travis
Travis Derouin wrote:
hi,
I've been using the external tidy and it seems with the tidy.conf in /extensions that a <body> tag is still generated and wrapped around the generated HTML of the article. Is there any way to avoid this?
Wrap the text in a valid document structure and then strip it after tidy completes. This is what Parser::tidy() does.
-- Tim Starling
This should be executing Parser::tidy though, we're just using it through these settings in LocalSettings:
$wgUseTidy = true; $wgAlwaysUseTidy = false; $wgTidyBin = '/usr/local/bin/tidy'; $wgTidyConf = $IP.'/extensions/tidy/tidy.conf'; $wgTidyOpts = '';
but it's wrapping the content of the article in these tags:
<html> <head> <title>test</title> </head> <body> </body> </html>
Is there any reason why it would be generating these if it's being called from Parser::tidy?
Travis
On 5/11/07, Tim Starling tstarling@wikimedia.org wrote:
Travis Derouin wrote:
hi,
I've been using the external tidy and it seems with the tidy.conf in /extensions that a <body> tag is still generated and wrapped around the generated HTML of the article. Is there any way to avoid this?
Wrap the text in a valid document structure and then strip it after tidy completes. This is what Parser::tidy() does.
-- Tim Starling
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Tim Starling wrote:
Wrap the text in a valid document structure and then strip it after tidy completes. This is what Parser::tidy() does.
Doesn't tidy have a configuration option 'show-body-only' which returns only a document fragment?
It does, and this is set in the default configuration found in extensions/tidy/tidy.conf. It still seems to be generating doctype, head and body tags though.
Travis
On 5/11/07, Edward Z. Yang edwardzyang@thewritingpot.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Tim Starling wrote:
Wrap the text in a valid document structure and then strip it after tidy completes. This is what Parser::tidy() does.
Doesn't tidy have a configuration option 'show-body-only' which returns only a document fragment? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRSlHqTO+fYacSNoRAsKTAJ47jRUtXeNdB/fpbn0ZOxg5ARXdOACfezHx McMm/TRJcoyfJmdtjLDWOog= =PmE4 -----END PGP SIGNATURE-----
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
It looks like the out of date project on sourceforge doesn't support show-body-only. Getting the latest source from CVS and building it seemed to fix the problem:
wikitech-l@lists.wikimedia.org