mirror of
https://github.com/pallets-eco/flask-debugtoolbar.git
synced 2026-01-10 07:29:31 -06:00
Added an exception when debug toolbar can't be inserted due to missing markup
This commit is contained in:
@@ -168,6 +168,12 @@ class DebugToolbarExtension(object):
|
||||
|
||||
if response.is_sequence:
|
||||
response_html = response.data.decode(response.charset)
|
||||
|
||||
if not "</body>" in response_html:
|
||||
raise RuntimeError(
|
||||
"The Flask-DebugToolbar requires there to be a "
|
||||
"closing body tag in the html.")
|
||||
|
||||
toolbar_html = self.debug_toolbars[real_request].render_toolbar()
|
||||
|
||||
content = replace_insensitive(
|
||||
|
||||
Reference in New Issue
Block a user