Commit 2b3ff316 authored by Tres Seaver's avatar Tres Seaver

Collector #2013: improved XHTML conformance of error messages

o Some of the error messages did not close '<p>' tags.
parent 62fd608a
......@@ -26,6 +26,9 @@ Zope Changes
Bugs fixed
- Collector #2013: improved XHTML conformance of error messages,
some of which did not close '<p>' tags.
- Collector #1999: fixed broken FTP rename functionality
(RNFR now returns 350 as status code instead 250)
......
......@@ -664,7 +664,7 @@ class HTTPResponse(BaseResponse):
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)
......@@ -678,7 +678,7 @@ class HTTPResponse(BaseResponse):
"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):
......@@ -691,9 +691,9 @@ class HTTPResponse(BaseResponse):
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,
......@@ -783,7 +783,7 @@ class HTTPResponse(BaseResponse):
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:
......@@ -794,7 +794,8 @@ class HTTPResponse(BaseResponse):
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment