Re: 2 Problems in GtkHtml



Thanks so much Iago for those details.

Yes, indeed, this is not a GTKHtml problem, but the problem in which
I'm generating the HTML myself.

Regards,
-Gaurav


On Thu, 13 Jan 2005 09:51:57 +0100, Iago Rubio <iago rubio hispalinux es> wrote:
Hi Gaurav,

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

I'm using libgtkhtml-2.so 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:
---------------
<HTML><BODY>
<a href="http://www.gtk.org"/>GTK Website</a>
</BODY></HTML>
---------------
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
link.

It means you're using:
<a href="http://www.gtk.org";></a>GTK Website</a>

With:
<a href="http://www.gtk.org/";>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:
---------------
<HTML><BODY>

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

</BODY></HTML>
---------------
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)+
http://www.w3.org/TR/REC-html40/sgml/dtd.html

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
HTML.

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

Regards.
--
Iago Rubio
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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