File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
libraries/botbuilder-applicationinsights/django_tests Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright (c) Microsoft Corporation. All rights reserved.
2
2
# Licensed under the MIT License.
3
3
4
+ import html
4
5
from rest_framework .decorators import api_view
5
6
from botbuilder .applicationinsights .django import common
6
7
from botbuilder .applicationinsights import ApplicationInsightsTelemetryClient
@@ -42,7 +43,7 @@ def errorer(request):
42
43
43
44
44
45
def echoer (request ):
45
- return HttpResponse (request .appinsights .request .id )
46
+ return HttpResponse (html . escape ( request .appinsights .request .id ) )
46
47
47
48
48
49
@api_view (["POST" ])
@@ -52,12 +53,12 @@ def getid(request, id):
52
53
53
54
@api_view (["POST" ])
54
55
def returncode (request , id ):
55
- return HttpResponse ("returncode" , status = int (id ))
56
+ return HttpResponse ("returncode" , status = int (html . escape ( id ) ))
56
57
57
58
58
59
@api_view (["POST" ])
59
60
def templater (request , data ):
60
- return TemplateResponse (request , "template.html" , {"context" : data })
61
+ return TemplateResponse (request , "template.html" , {"context" : html . escape ( data ) })
61
62
62
63
63
64
class classview :
You can’t perform that action at this time.
0 commit comments