Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad273aa

Browse files
committed
Escape html in variables
1 parent4c8d5c1 commitad273aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎backend/main/workers/tracebacks.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
importhtml
12
importjson
23
importlogging
34
importsys
@@ -197,7 +198,7 @@ def maybe_highlight(text):
197198
ifis_valid_syntax(text):
198199
returnpygments.highlight(text,lexer,pygments_formatter)
199200
else:
200-
returntext
201+
returnhtml.escape(text)
201202

202203

203204
deftest():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp