This repository was archived by the owner on Jan 5, 2026. It is now read-only.
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 11# Copyright (c) Microsoft Corporation. All rights reserved.
22# Licensed under the MIT License.
33
4+ import html
45from rest_framework .decorators import api_view
56from botbuilder .applicationinsights .django import common
67from botbuilder .applicationinsights import ApplicationInsightsTelemetryClient
@@ -42,7 +43,7 @@ def errorer(request):
4243
4344
4445def echoer (request ):
45- return HttpResponse (request .appinsights .request .id )
46+ return HttpResponse (html . escape ( request .appinsights .request .id ) )
4647
4748
4849@api_view (["POST" ])
@@ -52,12 +53,12 @@ def getid(request, id):
5253
5354@api_view (["POST" ])
5455def returncode (request , id ):
55- return HttpResponse ("returncode" , status = int (id ))
56+ return HttpResponse ("returncode" , status = int (html . escape ( id ) ))
5657
5758
5859@api_view (["POST" ])
5960def templater (request , data ):
60- return TemplateResponse (request , "template.html" , {"context" : data })
61+ return TemplateResponse (request , "template.html" , {"context" : html . escape ( data ) })
6162
6263
6364class classview :
You can’t perform that action at this time.
0 commit comments