Re: Question about pre tag transformation

	HTML Tidy transforms a line in html content like below A to a line in xml content like below B.
	
	A.
	<A>AAAAAAA
	
	B.
	AAAAAAA
	
	<A> is lost by HTML Tidy.
	I want HTML Tidy to transform a line A to a line A.
	
I note that http://www.w3.org/TR/html401/struct/Links.html#h-12.2
says quite explicitly:

    Authors may create an A element that specifies no anchors,
    i.e. that doesn't specify href, name, or id.  Values for
    these attributes may be set at a later time through scripts.

This means that deleting bare <A> tags is definitely a bug.

What can you do about it?

In parser.c, find the function ParseInline().

Find (near the top of that function), the statements

    if (element->tag == tag_a)
    {
        if (element->attributes == null)
        {
            ReportWarning(lexer, element->parent, element, DISCARDING_UNEXPECTE
            DiscardElement(element);
            return;
        }
    }

Delete those statements.  I have tested this change.

Received on Sunday, 4 March 2001 18:57:56 UTC