diff --git a/modules/block_requests.py b/modules/block_requests.py
index 0eb10fa2..e95cd7e2 100644
--- a/modules/block_requests.py
+++ b/modules/block_requests.py
@@ -43,19 +43,19 @@ def my_open(*args, **kwargs):
with original_open(*args, **kwargs) as f:
file_contents = f.read()
- file_contents = file_contents.replace(b'\t\t', b'')
- file_contents = file_contents.replace(b'cdnjs.cloudflare.com', b'127.0.0.1')
+ file_contents = file_contents.replace('\t\t', '')
+ file_contents = file_contents.replace('cdnjs.cloudflare.com', b'127.0.0.1')
file_contents = file_contents.replace(
- b'',
- b'\n '
- b'\n '
- b'\n '
- b'\n '
- b'\n '
- b'\n '
+ '',
+ '\n '
+ '\n '
+ '\n '
+ '\n '
+ '\n '
+ '\n '
)
- return io.BytesIO(file_contents)
+ return io.StringIO(file_contents)
else:
return original_open(*args, **kwargs)