Re: 2 Problems in GtkHtml

Hi Gaurav,

On Thu, 2005-01-13 at 09:16, Gaurav Jain wrote:
Hello All,

I'm using in my application.  I have found two
problems in the display of html documents using gtkhtml (the same
problems are not seen with a web browser such as mozilla).  I wish to
know whether these are known problems in GTKHTML?

1) The trailing "/" at the end of an href url leads to URL not being a
link, but just simple text.

Simple Example:
<a href=""/>GTK Website</a>
Expected output: A clickable hyperlink "GTK Website"

You're wrong here.

Actual output: Simple text "GTK Website", but no link
Note: If we don't have the trailing "/" at the end of the hyperlink,
the output it correctly displayed.

Correct, as <a /> is a closing tag as <img /> so there's no text on the

It means you're using:
<a href="";></a>GTK Website</a>

<a href="";>GTK Website</a>

You'll achieve the desired results.

2) A "div" tag inside a table row doesn't display table data at all.

Simple Example:

<TABLE border="1">
<TD align=center>Hello</TD>
<TD align=center>World!</TD>

Expected output: a table with one row and 2 columns, in one column
"Hello" and the second "World!"

Wrong again.

Actual output: nothing displayed

This is illegal HTML, a TR tag cannot contain DIV tags.

It only can contain TH or TD tags.

<!ELEMENT TR      (TH|TD)+

Note: If I remove the "DIV" tags, then the output is correct.

Because it becomes valid HTML when you take out the DIV tags from this
weird place. The DIV tag nested on TR tags is doing nothing at all.

Those aren't indeed problems on GTKHTML.

Take into account that browsers can - or will try to -  render bad HTML
but they're not required to do it.

IE renders almost any crapy HTML you'd send to it, so people use to code
poor HTML in the shake it'll work.

But this does not mean that any standard HTML browser will render bad

Gtkhtml is one of those renderers where you'll find bad HTML being not
rendered at all.

Iago Rubio

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]