Edgewall Software

Opened 12 years ago

Closed 12 years ago

#6835 closed defect (duplicate)

XHTML served as text/html, causes rendering problems

Reported by: ben@… Owned by: Jonas Borgström
Priority: low Milestone:
Component: web frontend Version:
Severity: minor Keywords: genshi safari
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Right now, web/chrome.py's render_template() says:

method = {'text/html': 'xhtml', 'text/plain': 'text'}.get(content_type, 'xml')

This causes output of XHTMLRenderer to be served out with Content-Type of text/html, and this in turn causes some serious rendering problems in certain edge cases. For example, if the generated markup contains <dl><dd><dl/></dd><dd></dd></dl>, then the <dl/> is interpreted by Safari to be just a <dl> (I am pretty sure this is the right way for it to interpret <dl/> in HTML strict mode), causing the subsequent <dd> to be nested on the wrong level.

I am pretty sure that templates should either be rendered with Genshi HTMLRenderer and transmitted as text/html, or rendered with Genshi XHTMLRenderer and transmitted as application/xhtml+xml.

Attachments (0)

Change History (2)

comment:1 by Piotr Kuczynski <piotr.kuczynski@…>, 12 years ago

Component: generalweb frontend
Keywords: genshi safari added
Milestone: 0.12
Priority: normallow
Severity: normalminor

comment:2 by Emmanuel Blot, 12 years ago

Milestone: 0.13
Resolution: duplicate
Status: newclosed

Duplicate of #6411

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.