Fix multiuser plugin py3 compatibility

This commit is contained in:
shortcutme 2019-04-04 13:24:42 +02:00
parent f55fd8d861
commit 042db64a00
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -76,7 +76,7 @@ class UiRequestPlugin(object):
message = "Hello again!" message = "Hello again!"
inject_html = inject_html.replace("{message}", message) inject_html = inject_html.replace("{message}", message)
inject_html = inject_html.replace("{script_nonce}", self.getScriptNonce()) inject_html = inject_html.replace("{script_nonce}", self.getScriptNonce())
return iter([re.sub("</body>\s*</html>\s*$", inject_html, back)]) # Replace the </body></html> tags with the injection return iter([re.sub(b"</body>\s*</html>\s*$", inject_html.encode(), back)]) # Replace the </body></html> tags with the injection
else: # No injection necessary else: # No injection necessary
return back_generator return back_generator