- From: Rolf Hemmerling <hemmerling@gmx.net>
- Date: Sun, 04 Nov 2001 12:44:35 +0100
- To: html-tidy@w3.org
Hello ! Klaus Johannes Rusch <KlausRusch@atmedia.net> wrote: > Tidy does handle PHP code references between <?php ... ?> as well as the > <script> ... </script> format. > Probably better handled by HTML/XML aware beautifiers, so if your code includes > <? ?> PHP fragments you could run phptidy and it would pretty-print the PHP > code and not touch anything else. a) Where may I find "phptidy" ? b) My problem is the re-coding of the PHP braces ">" and "<" into ">" and "<" <?php echo $URL ?> into ">" and "<" , when used as part of a URL. Original, working PHP3 code <?php $URL ="http://".$HTTP_HOST.$SCRIPT_NAME ?> <A href= "http://www.tranexp.com:2000/InterTran?type=url&from=eng&to=pob&url=<?php echo $URL ?>">translate<A> Tidy's results, unusable: <?php $URL ="http://".$HTTP_HOST.$SCRIPT_NAME ?> <A href="http://www.tranexp.com:2000/InterTran?type=url&from=eng&to=pob&url=<?php echo $URL ?>">translate</A> , as the usual PHP servers (Apache..) donīt recognize the PHP code in the URL string. Of course the PHP code must be processed when loading the web page, and not when executing the link! In opposite, the coding of & into & does not harm. c) the SAME problem with <A href="http://www.tranexp.com:2000/InterTran?type=url&from=eng&to=pob&url=<!--#echo var='HTTP_HOST'--><!--#echo var='SCRIPT_NAME'-->">translate</A> and <A href="http://www.tranexp.com:2000/InterTran?type=url&from=eng&to=pob&url=<!--#echo var='HTTP_HOST'--><!--#echo var='SCRIPT_NAME'-->">translate</A> :-( d) Tricks like <A href=""http://www.tranexp.com:2000/InterTran?type=url&from=eng&to=pob&url= \<?php echo $URL ?\>">translate</A> do not work, as the \> is no valid escape code for Tidy ? So how might I code right for Tidy, so that the URL contains the URL of the "current document in which this code is found", by the help of PHP or SSI/SHTML, WITHOUT Javascript/Java ? Or is this a "bug" or "missing feature" ? Btw, the code enables translation of the current WEB document into a foreign language, by the help of a free service. I am using Tidy of 4.Aug. 2000. Tia Sincerely Rolf -- / / / Alone on the data highway... / / like on an allee in Hannover-Herrenhausen / / / The Hemmerling (R) WEB site - Rolf Hemmerling, Germany / / http://www.hemmerling.com/
Received on Sunday, 4 November 2001 06:44:33 UTC