diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index a40bc654..d382c020 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -409,13 +409,31 @@ class UiWebsocketPlugin(object): """)) + donate_key = site.content_manager.contents.get("content.json", {}).get("donate", True) site_address = self.site.address body.append(_(u"""

  • {site_address} + """)) + if donate_key == False or donate_key == "": + pass + elif (type(donate_key) == str or type(donate_key) == unicode) and len(donate_key) > 0: + escaped_donate_key = cgi.escape(donate_key, True) + body.append(_(u""" +
    +
  • +
  • +
    +
    + {escaped_donate_key} + """)) + else: + body.append(_(u""" {_[Donate]} + """)) + body.append(_(u"""
  • """))