View previous topic :: View next topic |
Author |
Message |
fmouse Tux's lil' helper
Joined: 28 Jul 2003 Posts: 101
|
Posted: Fri Mar 10, 2006 7:17 pm Post subject: tidy HTML cleaner and PHP |
|
|
I've have app-text/htmltidy (version 5.10.26) installed on my desktop system; however, like previous versions of tidy, it misbehaves rather badly when dealing with embedded PHP sections in pages, notably where I have the PHP switch markup "<?php" inside a tag, which tidy insists on rendering as "<?php" in its output.
A bit of research turns up what looks like a promising lead. It appears that the functionality of tidy has been incorporated into recent versions of PHP with full support for PHP markup. So I tried emerging unstable pecl-tidy, which insisted that I uninstall the cli version of php. It looks as if this version of tidy allows PHP calls to tidy to be embedded into php web pages, so that they're self-cleaning, which is rather like tits on a bull for my purposes. I'm trying to get tidy as a CLI app that I can run as an external program for bluefish, which is what I use to develop PHP and HTML pages.
So I tried installing PHP5 with USE=cli. I figure I can probably write a PHP cli script that can do what I want (and what bluefish needs) using PHP function calls. PHP5 is supposed to have tidy with it by default, but it's disabled when PHP gets built ("--without-tidy" in the configure args). I modified the ebuild file, adding "--with-tidy", and rebuilt the digest so portage wouldn't complain, but tidy is still disabled in the installed PHP module for apache, doubtless also in the cli php executable.
So I'm rather stuck at this point. Does anyone have any ideas how I get a working version of tidy that properly handles PHP code, or where I can go for help with this? |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Fri Mar 10, 2006 7:49 pm Post subject: |
|
|
Instead of editing the ebuild you should add the tidy USE flag. _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
fmouse Tux's lil' helper
Joined: 28 Jul 2003 Posts: 101
|
Posted: Fri Mar 10, 2006 7:58 pm Post subject: |
|
|
tomk wrote: | Instead of editing the ebuild you should add the tidy USE flag. |
I'll try that, but 'tidy' isn't listed in IUSE for the ebuild, nor is tidy referenced elsewhere in the ebuild. |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Fri Mar 10, 2006 8:08 pm Post subject: |
|
|
fmouse wrote: | tomk wrote: | Instead of editing the ebuild you should add the tidy USE flag. |
I'll try that, but 'tidy' isn't listed in IUSE for the ebuild, nor is tidy referenced elsewhere in the ebuild. |
It's in the php5-sapi eclass. _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
fmouse Tux's lil' helper
Joined: 28 Jul 2003 Posts: 101
|
Posted: Fri Mar 10, 2006 8:17 pm Post subject: |
|
|
tomk wrote: | fmouse wrote: | tomk wrote: | Instead of editing the ebuild you should add the tidy USE flag. |
I'll try that, but 'tidy' isn't listed in IUSE for the ebuild, nor is tidy referenced elsewhere in the ebuild. |
It's in the php5-sapi eclass. |
OK, thanks. This is more complicated than I figured. I'm just trying to put together some PHP code for a customer and am tired of dealing with the CLI version of tidy and it's problems with PHP. Looks like I'm going to have to write a PHP script to do the job, too. There are docs on php.net which will help. |
|
Back to top |
|
|
|