diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py
index bc684306..9c6d9327 100644
--- a/plugins/Sidebar/SidebarPlugin.py
+++ b/plugins/Sidebar/SidebarPlugin.py
@@ -262,7 +262,7 @@ class UiWebsocketPlugin(object):
""")
for bad_file in site.bad_files.keys():
- body.append("
")
- body.append("
%s
" % site.content_manager.contents["content.json"]["title"])
+ body.append("
%s
" % cgi.escape(site.content_manager.contents.get("content.json", {}).get("title", ""), True))
body.append("
")
@@ -502,4 +502,4 @@ class UiWebsocketPlugin(object):
return self.response(to, "You don't have permission to run this command")
self.site.settings["autodownloadoptional"] = bool(owned)
self.site.update()
- self.site.worker_manager.removeGoodFileTasks()
\ No newline at end of file
+ self.site.worker_manager.removeGoodFileTasks()