Formatting for better readability

This commit is contained in:
shortcutme 2019-08-02 16:06:22 +02:00
parent 3e97c154a0
commit be742c78e7
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 8 additions and 3 deletions

View file

@ -56,9 +56,10 @@ class UiWebsocketPlugin(object):
if "ADMIN" in self.getPermissions(to):
self.cbMuteRemove(to, auth_address)
else:
cert_user_id = html.escape(filter_storage.file_content["mutes"][auth_address]["cert_user_id"])
self.cmd(
"confirm",
[_["Unmute <b>%s</b>?"] % html.escape(filter_storage.file_content["mutes"][auth_address]["cert_user_id"]), _["Unmute"]],
[_["Unmute <b>%s</b>?"] % cert_user_id, _["Unmute"]],
lambda res: self.cbMuteRemove(to, auth_address)
)
@ -180,7 +181,7 @@ class SiteStoragePlugin(object):
@PluginManager.registerTo("UiRequest")
class UiRequestPlugin(object):
def actionWrapper(self, path, extra_headers=None):
match = re.match("/(?P<address>[A-Za-z0-9\._-]+)(?P<inner_path>/.*|$)", path)
match = re.match(r"/(?P<address>[A-Za-z0-9\._-]+)(?P<inner_path>/.*|$)", path)
if not match:
return False
address = match.group("address")