代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/python-werkzeug 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4a8f76c289d24a13efc9c6eb8b4e09890140ed82 Mon Sep 17 00:00:00 2001
From: David Lord <[email protected]>
Date: Mon, 7 Feb 2022 12:04:14 -0800
Subject: [PATCH] fix debugger html
fix doctype typo
remove unnecessary type attributes
let response set charset
---
src/werkzeug/debug/__init__.py | 2 +-
src/werkzeug/debug/tbtools.py | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/werkzeug/debug/__init__.py b/src/werkzeug/debug/__init__.py
index 936a9639..ac513830 100644
--- a/src/werkzeug/debug/__init__.py
+++ b/src/werkzeug/debug/__init__.py
@@ -327,7 +327,7 @@ class DebuggedApplication:
secret=self.secret,
evalex_trusted=is_trusted,
)
- response = Response(html, status=500, content_type="text/html")
+ response = Response(html, status=500, mimetype="text/html")
try:
yield from response(environ, start_response)
diff --git a/src/werkzeug/debug/tbtools.py b/src/werkzeug/debug/tbtools.py
index 17e3b361..7ce69519 100644
--- a/src/werkzeug/debug/tbtools.py
+++ b/src/werkzeug/debug/tbtools.py
@@ -12,19 +12,15 @@ from ..utils import cached_property
from .console import Console
HEADER = """\
-<!DOCTYPE html">
+<!DOCTYPE html>
<html>
<head>
<title>%(title)s // Werkzeug Debugger</title>
- <link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css"
- type="text/css">
- <!-- We need to make sure this has a favicon so that the debugger does
- not accidentally trigger a request to /favicon.ico which might
- change the application's state. -->
+ <link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css">
<link rel="shortcut icon"
href="?__debugger__=yes&cmd=resource&f=console.png">
<script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script>
- <script type="text/javascript">
+ <script>
var CONSOLE_MODE = %(console)s,
EVALEX = %(evalex)s,
EVALEX_TRUSTED = %(evalex_trusted)s,
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。