We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"raw" view is not raw, adds extra backslash
#### Problem Description

I just noticed during https://github.com/mitmproxy/mitmproxy/issues/5469#issuecomment-1191343747

#### Steps to reproduce the behavior:

http.txt

```
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 1

\
```

1. `ncat -l 1337 < http.txt`
2. `mitmproxy`
3. `curl --proxy localhost:8080 http://127.0.0.1:1337`

raw is `\\`:

![image](https://user-images.githubusercontent.com/679144/180199838-07c02668-5dab-4210-b5b6-aea78066e0fd.png)

hex:

![image](https://user-images.githubusercontent.com/679144/180199860-2cdd9455-7846-4921-b67c-6b9c3669b268.png)

#### System Information

```
Mitmproxy: 8.1.1 binary
Python:    3.10.5
OpenSSL:   OpenSSL 3.0.3 3 May 2022
Platform:  Linux-5.15.0-41-generic-x86_64-with-glibc2.35
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mitmproxy/contentviews/raw.py`
Content:
```
1 from . import base
2 from mitmproxy.utils import strutils
3 
4 
5 class ViewRaw(base.View):
6     name = "Raw"
7 
8     def __call__(self, data, **metadata):
9         return "Raw", base.format_text(strutils.bytes_to_escaped_str(data, True))
10 
11     def render_priority(self, data: bytes, **metadata) -> float:
12         return 0.1 * float(bool(data))
13
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mitmproxy/contentviews/raw.py b/mitmproxy/contentviews/raw.py
--- a/mitmproxy/contentviews/raw.py
+++ b/mitmproxy/contentviews/raw.py
@@ -1,12 +1,11 @@
 from . import base
-from mitmproxy.utils import strutils
 
 
 class ViewRaw(base.View):
     name = "Raw"
 
     def __call__(self, data, **metadata):
-        return "Raw", base.format_text(strutils.bytes_to_escaped_str(data, True))
+        return "Raw", base.format_text(data)
 
     def render_priority(self, data: bytes, **metadata) -> float:
         return 0.1 * float(bool(data))

{"golden_diff": "diff --git a/mitmproxy/contentviews/raw.py b/mitmproxy/contentviews/raw.py\n--- a/mitmproxy/contentviews/raw.py\n+++ b/mitmproxy/contentviews/raw.py\n@@ -1,12 +1,11 @@\n from . import base\n-from mitmproxy.utils import strutils\n \n \n class ViewRaw(base.View):\n     name = \"Raw\"\n \n     def __call__(self, data, **metadata):\n-        return \"Raw\", base.format_text(strutils.bytes_to_escaped_str(data, True))\n+        return \"Raw\", base.format_text(data)\n \n     def render_priority(self, data: bytes, **metadata) -> float:\n         return 0.1 * float(bool(data))\n", "issue": "\"raw\" view is not raw, adds extra backslash\n#### Problem Description\r\n\r\nI just noticed during https://github.com/mitmproxy/mitmproxy/issues/5469#issuecomment-1191343747\r\n\r\n#### Steps to reproduce the behavior:\r\n\r\nhttp.txt\r\n\r\n```\r\nHTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 1\r\n\r\n\\\r\n```\r\n\r\n1. `ncat -l 1337 < http.txt`\r\n2. `mitmproxy`\r\n3. `curl --proxy localhost:8080 http://127.0.0.1:1337`\r\n\r\nraw is `\\\\`:\r\n\r\n![image](https://user-images.githubusercontent.com/679144/180199838-07c02668-5dab-4210-b5b6-aea78066e0fd.png)\r\n\r\nhex:\r\n\r\n![image](https://user-images.githubusercontent.com/679144/180199860-2cdd9455-7846-4921-b67c-6b9c3669b268.png)\r\n\r\n#### System Information\r\n\r\n```\r\nMitmproxy: 8.1.1 binary\r\nPython:    3.10.5\r\nOpenSSL:   OpenSSL 3.0.3 3 May 2022\r\nPlatform:  Linux-5.15.0-41-generic-x86_64-with-glibc2.35\r\n```\r\n\n", "before_files": [{"content": "from . import base\nfrom mitmproxy.utils import strutils\n\n\nclass ViewRaw(base.View):\n    name = \"Raw\"\n\n    def __call__(self, data, **metadata):\n        return \"Raw\", base.format_text(strutils.bytes_to_escaped_str(data, True))\n\n    def render_priority(self, data: bytes, **metadata) -> float:\n        return 0.1 * float(bool(data))\n", "path": "mitmproxy/contentviews/raw.py"}], "after_files": [{"content": "from . import base\n\n\nclass ViewRaw(base.View):\n    name = \"Raw\"\n\n    def __call__(self, data, **metadata):\n        return \"Raw\", base.format_text(data)\n\n    def render_priority(self, data: bytes, **metadata) -> float:\n        return 0.1 * float(bool(data))\n", "path": "mitmproxy/contentviews/raw.py"}]}