mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
19 lines
379 B
Python
19 lines
379 B
Python
from lxml import etree
|
|
from io import StringIO
|
|
|
|
from django.urls import path
|
|
from django.http import HttpResponse
|
|
from django.template import Template, Context, Engine, engines
|
|
|
|
|
|
def a(request):
|
|
value = request.GET['xpath']
|
|
f = StringIO('<foo><bar></bar></foo>')
|
|
tree = etree.parse(f)
|
|
r = tree.xpath("/tag[@id='%s']" % value)
|
|
|
|
|
|
urlpatterns = [
|
|
path('a', a)
|
|
]
|