don't use html/dtd validator as default validator for non html views. Closes #550162
--- a/devtools/testlib.py Tue Dec 01 12:03:42 2009 +0100
+++ b/devtools/testlib.py Tue Dec 01 12:06:17 2009 +0100
@@ -165,10 +165,13 @@
try:
validatorclass = self.vid_validators[view.id]
except KeyError:
- if template is None:
- default_validator = HTMLValidator
+ if view.content_type in ('text/html', 'application/xhtml+xml'):
+ if template is None:
+ default_validator = HTMLValidator
+ else:
+ default_validator = DTDValidator
else:
- default_validator = DTDValidator
+ default_validator = None
validatorclass = self.content_type_validators.get(view.content_type,
default_validator)
if validatorclass is None: