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("
  • %s
  • " % bad_file) + body.append("
  • %s
  • " % cgi.escape(bad_file, True)) body.append(""" @@ -305,8 +305,8 @@ class UiWebsocketPlugin(object): """.format(**locals())) def sidebarRenderOwnSettings(self, body, site): - title = cgi.escape(site.content_manager.contents["content.json"]["title"], True) - description = cgi.escape(site.content_manager.contents["content.json"].get("description", ""), True) + title = cgi.escape(site.content_manager.contents.get("content.json", {}).get("title", ""), True) + description = cgi.escape(site.content_manager.contents.get("content.json", {}).get("description", ""), True) privatekey = cgi.escape(self.user.getSiteData(site.address, create=False).get("privatekey", "")) body.append(u""" @@ -354,7 +354,7 @@ class UiWebsocketPlugin(object): body = [] 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()