equal
deleted
inserted
replaced
772 @nocoverage |
772 @nocoverage |
773 def _check_html(self, output, view, template='main-template'): |
773 def _check_html(self, output, view, template='main-template'): |
774 """raises an exception if the HTML is invalid""" |
774 """raises an exception if the HTML is invalid""" |
775 output = output.strip() |
775 output = output.strip() |
776 validator = self.get_validator(view, output=output) |
776 validator = self.get_validator(view, output=output) |
|
777 if validator is None: |
|
778 return |
777 if isinstance(validator, htmlparser.DTDValidator): |
779 if isinstance(validator, htmlparser.DTDValidator): |
778 # XXX remove <canvas> used in progress widget, unknown in html dtd |
780 # XXX remove <canvas> used in progress widget, unknown in html dtd |
779 output = re.sub('<canvas.*?></canvas>', '', output) |
781 output = re.sub('<canvas.*?></canvas>', '', output) |
780 return self.assertWellFormed(validator, output.strip(), context= view.__regid__) |
782 return self.assertWellFormed(validator, output.strip(), context= view.__regid__) |
781 |
783 |