Opened 17 years ago
Closed 16 years ago
#6835 closed defect (duplicate)
XHTML served as text/html, causes rendering problems
Reported by: | 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: |
Description
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 , 16 years ago
Component: | general → web frontend |
---|---|
Keywords: | genshi safari added |
Milestone: | → 0.12 |
Priority: | normal → low |
Severity: | normal → minor |
comment:2 by , 16 years ago
Milestone: | 0.13 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Duplicate of #6411