[issue4085] 2.5.2 whatsnew document corrupts names, by having broken HTML, at least on the Web.
report at bugs.python.org
Thu Oct 9 11:27:55 CEST 2008
New submission from David Jones <drj at pobox.com>:
Consider the web page:
(the problem appears throughout the whatsnew document, but that page
happens to be short and have more than one instance).
On my browser, Safari 3.1.2 on Intel OS X 10.4.11, Martin von Löwis has
his name corrupted, as does Lars Gustäbel.
The problem seems to be because whilst the page is encoded in utf-8 the
web server does not transmit a Content-Type header that specifies utf-8:
$ curl -I http://www.python.org/doc/2.5.2/whatsnew/acks.html
HTTP/1.1 200 OK
Date: Thu, 09 Oct 2008 08:51:22 GMT
Server: Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_ssl/2.2.3
OpenSSL/0.9.8c mod_wsgi/2.0 Python/2.4.4
Last-Modified: Fri, 22 Feb 2008 12:58:18 GMT
Shouldn't that be "Content-Type: text/html; charset=UTF-8"? Yeah,
probably. Shouldn't the browser be using the meta tag in the HTML file
itself? Probably, but your broken HTML is preventing Safari from
parsing the <meta> tag correctly.
$ curl http://www.python.org/doc/2.5.2/whatsnew/acks.html | grep
<link rel="first" href="whatsnew25.html" title='What's new in python
The title attribute of that link element is incorrect. It features a
single-quote inside a single-quoted string. Oopsie. I don't think
Safari should be so mean, but bad HTML is bad HTML.
Taking a local copy and fixing that title attribute (by using double
quotes for example) causes the page to render just fine.
nosy: drj, georg.brandl
title: 2.5.2 whatsnew document corrupts names, by having broken HTML, at least on the Web.
versions: Python 2.5
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list