Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2548 (closed defect: migrated)

Opened 7 years ago

Last modified 7 years ago

Content-Type in the quickstart templates

Reported by: chrisz Owned by:
Priority: normal Milestone: 2.1.1
Component: TurboGears Version: trunk
Severity: normal Keywords: genshi
Cc:

Description

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

Change History

comment:1 Changed 7 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.