Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_filter_middleware(self):
tree = pkg_parse('filter_xhtml.xsl')
return XSLTMiddleware(self.app, self.global_conf,
tree=tree,
read_network=False,
read_file=False,
update_content_length=self.update_content_length,
ignored_extensions=self.ignored_extensions,
environ_param_map={'diazo.filter_xpath': 'xpath'},
doctype='',
content_type=self.content_type,
unquoted_params=['xpath'],
)