#20 — IssueView.get_public_body returns html document not html snippet
by
Christian Ledermann
—
last modified
Mar 17, 2011 09:51 AM
| State | Unconfirmed |
|---|---|
| Version: |
—
|
| Area | Functionality |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Christian Ledermann |
| Submitted on | Mar 17, 2011 |
| Responsible |
—
|
| Target release: |
—
|
(version 2.5.10)
IssueView.get_public_body returns the full html document. This method is used in the views NewsletterView and IssueView. These views render the output of this method into a pagetemplate which produces invalid html.
e.g.: ::
<html>
<header>..</header>
<body>
...
This is the outer template all_issues_view.pt or issue_public_view_pt
...
<html>
<header>...</header>
<body>
only the content of the body tag should be rendered
...
</body>
</html>
...
</body>
</html>
most browsers ignore this but it will show on validators and deliverance/diazo will choke on it
IssueView.get_public_body returns the full html document. This method is used in the views NewsletterView and IssueView. These views render the output of this method into a pagetemplate which produces invalid html.
e.g.: ::
<html>
<header>..</header>
<body>
...
This is the outer template all_issues_view.pt or issue_public_view_pt
...
<html>
<header>...</header>
<body>
only the content of the body tag should be rendered
...
</body>
</html>
...
</body>
</html>
most browsers ignore this but it will show on validators and deliverance/diazo will choke on it
- Steps to reproduce:
- check the pages @@enl_public_view and @@all_issues_view in a html validator.
imho opinion it should suffice to return the slice between '<body>' and '</body>' of html in IssueView.get_public_body.
(this looks a bit crude and hacky as opposed to return the content of the tag body of the parsed xml, but as there is only one body tag and the self.context._render_output_html() should already return well formed html which would have exactly one body tag this works just as well and is less costly as no additional parsing is involved)
No responses can be added.
If you can, please log in before submitting a reaction.
