def _get_module(self, request): xml_string = '' if 'data' in request.GET: data = request.GET['data'] xml_data = etree.fromstring(data) for xml_data_element in xml_data: xml_string += etree.tostring(xml_data_element) if xml_string != '': self.data = xml_string return TextAreaModule.get_module(self, request)
def _get_module(self, request): if 'data' in request.GET: self.data = str(request.GET['data']) return TextAreaModule.get_module(self, request)
def __init__(self): self.data = '' TextAreaModule.__init__(self)
def _get_module(self, request): if 'data' in request.GET: self.data = str(request.GET['data'].encode("utf-8")) return TextAreaModule.get_module(self, request)
def __init__(self): self.parser = HTMLParser() TextAreaModule.__init__(self, label="Raw XML", data="Insert XML Data here...")