From: Ian B. <ia...@co...> - 2003-05-20 01:43:48
|
On Mon, 2003-05-19 at 20:35, Randall Smith wrote: > That got rid of the error, but there appears to be no validation. I put > in bogus tags like <font> and <br and got on response. I installed the > software and ran the executable at the command line. Hmm... can you put a print in, like: status = self.response().header('status', None) if status and status.find('Redirect') != -1: return response = self.response().rawResponse() contents = response['contents'] + closingTags ## Right here: print contents from WebUtils import WDGValidator errorText = WDGValidator.validateHTML(contents) if not errorText: return self.write(errorText) And make sure that it's really getting the content? But maybe first test the WDGValidator module, like: $ cd path/to/Webware $ python >>> from WebUtils.WDGValidator import validateHTML >>> validateHTML('<html><title and stuff</title>') ... And see if that's working. I think validateHTML might just fail silently if it can't run the validate script (I've never tested that failure situation). Maybe try putting the full path in WDGValidator, like: input, output = os.popen4('/path/to/validate') Ian |