Re: 2 Problems in GtkHtml
- From: Iago Rubio <iago rubio hispalinux es>
- To: gtk-app-devel-list gnome org
- Subject: Re: 2 Problems in GtkHtml
- Date: Thu, 13 Jan 2005 09:51:57 +0100
On Thu, 2005-01-13 at 09:16, Gaurav Jain wrote:
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.
<a href="http://www.gtk.org"/>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="http://www.gtk.org"></a>GTK Website</a>
<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.
Expected output: a table with one row and 2 columns, in one column
"Hello" and the second "World!"
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.
] [Thread Prev