W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2001

Re: Question about pre tag transformation

From: Richard A. O'Keefe <ok@atlas.otago.ac.nz>
Date: Mon, 5 Mar 2001 12:57:28 +1300 (NZDT)
Message-Id: <200103042357.MAA10757@atlas.otago.ac.nz>
To: hokamoto@mse.mei.co.jp
Cc: html-tidy@w3.org
	HTML Tidy transforms a line in html content like below A to a line in xml content like below B.
	<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

Delete those statements.  I have tested this change.
Received on Sunday, 4 March 2001 18:57:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:49 UTC