simple-browser.py example doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGTK |
Fix Released
|
Medium
|
|||
gnome-python-extras (Ubuntu) |
Fix Released
|
Low
|
Ubuntu Desktop Bugs |
Bug Description
Binary package hint: python-
The example /usr/share/
link_clicked: http://
/usr/share/
document.
/usr/share/
document.
** (simple-
Changed in pygtk: | |
status: | Unknown → Fix Released |
Changed in pygtk: | |
importance: | Unknown → Medium |
The problem seems to be that gtkhtml2. Document. open_stream( ) doesn't handle a Content-type with a charset specified. http:// www.gnome. org/ has a Content-type of "text/html; charset=utf-8". The following hack resolves the problem, but it should be done better:
--- /usr/share/ doc/python- gnome2- extras/ examples/ gtkhtml2/ simple- browser. py 2002-04-30 02:02:20.000000000 +0100 getheader( 'Content- type')
document. open_stream( mime)
document. open_stream( 'text/plain' )
+++ simple-browser.py 2006-10-03 18:41:07.000000000 +0100
@@ -38,6 +38,7 @@
headers = f.info()
mime = headers.
if mime:
+ if mime.find(';') != -1: mime = mime.split(';')[0]
else: