zope.pagetemplatefile.PageTemplateFile strips out Content-type <meta> tag
Bug #920495 reported by
Miano Njoka
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.pagetemplate |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Is there a reason for stripping out of the Content-type <meta> tag from ZPT templates? This is done in the _prepare_html function in zope.pagetempla
Second, finding and stripping of the meta tag is done using a regular expression which is incorrect because simply changing the order of the attributes on the <meta> tag would make the reg-exp not match.
Thanks.
To post a comment you must log in.
The patch attached uses HTMLParser to get the meta content type tag information in the HTML if it exists and leaves it in the text. Also changed the tests to take into account that the meta tag is left in the HTML.