Re: 30apr00 bugs: spaces in attributs, empty ALT attributes

On Wed, 03 May 2000, Sebastian Lange wrote:

> Hello Mikael, thanks for your reply.
> 
> At 21:03 02.05.2000 +0200, Mikael hultgren wrote:
> >On Tue, 02 May 2000, Sebastian Lange wrote:
> >
> > > After compilation and testing of the new tidy release (SuSE Linux 6.2), I
> > > have noticed following misbehaviours:
> >
> >The new release, would that be tidy30april?
> 
> yes. freshly compiled on a SuSE Linux 6.2 Distribution.
> 
> 
> > >
> > > The commonnly found
> > >       <FONT FACE="Arial, Helvetica, sans-serif">
> > > gets tidied to:
> > >       <FONT FACE="Arial," SANS-SERIF="">
> >
> >I tried this and i didnt see this beahaviour, im using tidy30april on linux.
> 
> this is my syntax (tidy being called from within a perl script):
> 
> $tidiedMessage = `echo "$Message" | tidy30apr00 -f /dev/null -quiet -latin1 
> --wrap 0 --wrap-attributes no --tidy-mark no --uppercase-tags yes 
> --uppercase-attributes yes --alt-text '' --doctype '-//W3C//DTD HTML 4.0 
> Transitional//EN' --quote-marks yes`;
> 
> I tried removing all the configuration directives, with no significant 
> changes in the result.
> 
> with $Message = '<FONT FaCe="Comic Sans MS">test</A>', $tidiedMessage will be:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </HEAD>
> <BODY>
> <FONT FACE="Comic" SANS="" MS="">test</FONT>
> </BODY>
> </HTML>
> 
> The irrelevant lines (doctype to body, /body to /html) are then 
> automatically removed by my perl script, which leaves $tidiedMessage to be 
> '<FONT FACE="Comic" SANS="" MS="">test</FONT>'.
> Having this tidied again, turns $tidiedMessage into '<FONT FACE="Comic" 
> SANS="MS=">test</FONT>' which then stays like that on subsequent tidy attempts.

Youre problem is this, the echo string in the perl script strips off the "
character, which means that you feed tidy this string
<FONT FaCe=Comic Sans MS>test</A>, which is wrong.

rewrite to something like this.

my $Message = "<FONT FaCe='Comic Sans MS'>test</A>";

This yields the proper result for you, or even better

my $Message = qq ! <FONT FaCe='Comic Sans MS'>test</A> !;

micke
-- 
When i die, I want to die peacefully, in my sleep. Like my grandfather.
Not screaming in terror, like the passengers in his car

pub  1024D/D9529B7A 1999-12-14 Mikael hultgren <micke@four04.com>
     Key fingerprint = A2E6 6A3F 3A48 6EDF 0689  C3DE 4B9A 7EC8 D952 9B7A
To get public key send message with subject line 'get pgp keys'

Received on Wednesday, 3 May 2000 11:48:40 UTC