Menu

#73 Content-Type in the quickstart templates

2.1.2
closed
nobody
core
defect
normal
core
2.1.0
2011-08-20
2011-03-29
No

The quickstart (master and pages) templates for Genshi have the following line:

<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''">

The py:replace="''" bit is ignored when you display the templates locally, but it causes these lines not to appear in the rendered web page.

Is there any reason why we are suppressing the Content-Type here? I think it should be set and the py:replace="''" bit is actually only a leftover from Kid where the Content-Type was injected automatically, but Genshi doesn't do that.

So I suggest to change this line in the master.html template as follows:

<meta http-equiv="Content-Type" content="text/html; charset=${tg.config.get('templating.genshi.default_encoding', 'utf-8')}">

In the page templates these lines should not be changed since otherwise we would include this line twice in the rendered page.

This applies to all TG versions >= 1.1 (including 2.x).

Discussion