def post(self): self.response.out.write('<html><body>Output:</br></br><div style="font-family:Courier New, Arial, sans-serif;">') txtquery = cgi.escape(self.request.get('txtquery')) txtcontent = cgi.escape(self.request.get('content')) txtout = highlightdoc.highlight_doc(txtcontent, txtquery) self.response.out.write(txtout if len(txtout) > 0 else "No match found.") self.response.out.write('</div></br><a href="javascript:history.back()">Back</a></body></html>')
def testQuery(self, query): return highlightdoc.highlight_doc(doc, query)