Log message for revision 41461: Collector #2013: improved XHTML conformance of error messages o Some of the error messages did not close '<p>' tags.
Changed: U Zope/trunk/doc/CHANGES.txt U Zope/trunk/lib/python/ZPublisher/HTTPResponse.py -=- Modified: Zope/trunk/doc/CHANGES.txt =================================================================== --- Zope/trunk/doc/CHANGES.txt 2006-01-27 01:40:46 UTC (rev 41460) +++ Zope/trunk/doc/CHANGES.txt 2006-01-27 01:47:38 UTC (rev 41461) @@ -197,6 +197,9 @@ Bugs Fixed + - Collector #2013: improved XHTML conformance of error messages, + some of which did not close '<p>' tags. + - Collector #2002: fixed broken 'ls -R' functionality (didn't recurse properly subclasses of OFS.Folder) Modified: Zope/trunk/lib/python/ZPublisher/HTTPResponse.py =================================================================== --- Zope/trunk/lib/python/ZPublisher/HTTPResponse.py 2006-01-27 01:40:46 UTC (rev 41460) +++ Zope/trunk/lib/python/ZPublisher/HTTPResponse.py 2006-01-27 01:47:38 UTC (rev 41461) @@ -679,7 +679,7 @@ raise NotFound, self._error_html( "Debugging Notice", "Zope has encountered a problem publishing your object.<p>" - "\n%s" % entry) + "\n%s</p>" % entry) def badRequestError(self,name): self.setStatus(400) @@ -693,7 +693,7 @@ "The parameter, <em>%s</em>, " % name + "was omitted from the request.<p>" + "Make sure to specify all required parameters, " + - "and try the request again." + "and try the request again.</p>" ) def _unauthorized(self): @@ -706,9 +706,9 @@ m = "<strong>You are not authorized to access this resource.</strong>" if self.debug_mode: if self._auth: - m = m + '<p>\nUsername and password are not correct.' + m = m + '<p>\nUsername and password are not correct.</p>' else: - m = m + '<p>\nNo Authorization header found.' + m = m + '<p>\nNo Authorization header found.</p>' raise Unauthorized, m def exception(self, fatal=0, info=None, @@ -798,7 +798,7 @@ if fatal and t is SystemExit and v.code == 0: body = self.setBody( (str(t), - 'Zope has exited normally.<p>' + self._traceback(t, v, tb)), + 'Zope has exited normally.<p>' + self._traceback(t, v, tb) + '</p>'), is_error=1) else: try: @@ -809,7 +809,8 @@ body = self.setBody( (str(t), 'Sorry, a site error occurred.<p>' - + self._traceback(t, v, tb)), + + self._traceback(t, v, tb) + + '</p>'), is_error=1) elif self.isHTML(b): # error is an HTML document, not just a snippet of html _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins