diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index a40bc654..230be449 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -409,16 +409,30 @@ class UiWebsocketPlugin(object): """)) - site_address = self.site.address - body.append(_(u""" -
  • -
    -
    - {site_address} - {_[Donate]} -
    -
  • - """)) + donate_key = site.content_manager.contents.get("content.json", {}).get("donate", True) + 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: + site_address = self.site.address + body.append(_(u""" +
  • +
    +
    + {site_address} + {_[Donate]} +
    +
  • + """)) def sidebarRenderOwnedCheckbox(self, body, site): if self.site.settings["own"]: