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

Text Being Moved Inside of New-Inline-Tag When Text Originally Ou tside of Tag

From: Ivan Gum <igum@digitalimpact.com>
Date: Thu, 3 Jan 2002 11:33:38 -0800
Message-ID: <E1932DB448A64D4898D773691B7CC7AED63B56@diexgcu1.digitalimpact.com>
To: "'html-tidy@w3.org'" <html-tidy@w3.org>
Tidy doesn't seem to properly tidy up code where I'm using a user-defined
tag.
I have a new-inline-tag called NEWTAG.  This is Not defined as an empty tag.

INPUT:
<font color="#FFFFFFFF"><newtag>click here</newtag> to do some stuff.</font>

OUTPUT:
<font color="#FFFFFFFF"><newtag"><font color="#FFFFFFFF">click here</font>
to do some stuff.</newtag></font>

line 24 column 62 - Warning: inserting implicit <font>
line 24 column 72 - Warning: replacing unexpected </newtag> by </font>
line 24 column 102 - Warning: missing </newtag> before </font>

It forces a <font> tag within the newtag which I don't like but is not
really a problem. However by doing that it then expects a </font> tag.
Instead it sees the </newtag> and instead of Adding a </font> tag it
Replaces my </newtag> with </font>.  Since it inserted the <font> tag, why
doesn't it just insert the closing </font> tag instead of replacing the
</newtag>?  Is this a bug?  Later on it inserts a </newtag> replacing my
</newtag> that it wiped out, but the problem is it puts it in the wrong
location.  

The end result is that in the input, the text "to do some stuff" is Outside
of the <newtag>, but after processing, that text is now Inside the <newtag>!

Is there any way to workaround this behavior?  This new-inline-tag is
required to be a non-empty tag.  Thanks.

My jtidy.cfg looks like this...

new-inline-tags: newtag
new-empty-tags: 
quiet: true
doctype: omit
uppercase-tags: yes
tidy-mark: no
quote-ampersand: yes
char-encoding: utf8
Received on Thursday, 3 January 2002 14:34:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT