Fix blank lines in content renderer (#8248)

This commit is contained in:
vincentdehaan 2026-05-31 18:14:41 +02:00 committed by GitHub
parent 12a292c2e7
commit d87f2fd95e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 5 deletions

View file

@ -15,6 +15,8 @@
([#8233](https://github.com/mitmproxy/mitmproxy/pull/8233), @ariel42)
- mitmweb: Fix AVIF images and `image/vnd.microsoft.icon` favicons not rendering in the response tab.
([#8232](https://github.com/mitmproxy/mitmproxy/pull/8232), @ariel42)
- mitmweb: Fix correctly displaying multiple blank lines in content renderer.
([#8248](https://github.com/mitmproxy/mitmproxy/pull/8248), @vincentdehaan)
## 12 May 2026: mitmproxy 12.2.3

View file

@ -79,7 +79,9 @@ exports[`HttpMessage 1`] = `
<div>
rawdata
</div>
<div />
<div>
 
</div>
</pre>
</div>
</DocumentFragment>
@ -286,7 +288,9 @@ exports[`HttpMessage 3`] = `
<div>
rawdata
</div>
<div />
<div>
 
</div>
</pre>
</div>
</DocumentFragment>
@ -371,7 +375,9 @@ exports[`HttpMessage 4`] = `
<div>
rawdata
</div>
<div />
<div>
 
</div>
</pre>
</div>
</DocumentFragment>

View file

@ -15,7 +15,9 @@ exports[`ContentRenderer 1`] = `
/>
Show more
</button>
<div />
<div>
 
</div>
</pre>
</DocumentFragment>
`;

View file

@ -30,7 +30,7 @@ const ContentRenderer = React.memo(function ContentRenderer({
Show more
</button>
) : (
<div key={i}>{line}</div>
<div key={i}>{line || " "}</div>
),
)}
</pre>