Public Inbox Output Broken Due to Double HTML Encoding

From: Ammar Faizi
Date: Thu Sep 05 2024 - 11:47:13 EST



Hi,

We have noticed a recent issue with the lore public inbox output where
it appears to be affected by double HTML encoding. This problem
surfaced after 1 September 2024, as that was the last time we observed
the correct output.

The issue is particularly visible in email headers, where characters
such as <, >, and quotes are incorrectly encoded twice. This results in
unreadable and improperly rendered email headers. It also breaks
several links in the HTML output.

For instance, in this thread:

https://lore.kernel.org/qemu-devel/20240905141211.1253307-1-kraxel@xxxxxxxxxx/

Here's the current, broken output:
```
From: Gerd Hoffmann &lt;kraxel@xxxxxxxxxx&gt;
To: qemu-devel@xxxxxxxxxx
Cc: &#34;Paolo Bonzini&#34; &lt;pbonzini@xxxxxxxxxx&gt;,
&#34;Yanan Wang&#34; &lt;wangyanan55@xxxxxxxxxx&gt;,
&#34;Zhao Liu&#34; &lt;zhao1.liu@xxxxxxxxx&gt;,
&#34;Eduardo Habkost&#34; &lt;eduardo@xxxxxxxxxxx&gt;,
&#34;Richard Henderson&#34; &lt;richard.henderson@xxxxxxxxxx&gt;,
&#34;Marcel Apfelbaum&#34; &lt;marcel.apfelbaum@xxxxxxxxx&gt;,
&#34;Philippe Mathieu-Daud&#233;&#34; &lt;philmd@xxxxxxxxxx&gt;,
&#34;Michael S. Tsirkin&#34; &lt;mst@xxxxxxxxxx&gt;,
```

And here's the expected output:
```
From: Gerd Hoffmann <kraxel@xxxxxxxxxx>
To: qemu-devel@xxxxxxxxxx
Cc: "Paolo Bonzini" <pbonzini@xxxxxxxxxx>,
"Yanan Wang" <wangyanan55@xxxxxxxxxx>,
"Zhao Liu" <zhao1.liu@xxxxxxxxx>,
"Eduardo Habkost" <eduardo@xxxxxxxxxxx>,
"Richard Henderson" <richard.henderson@xxxxxxxxxx>,
"Marcel Apfelbaum" <marcel.apfelbaum@xxxxxxxxx>,
"Philippe Mathieu-Daudé" <philmd@xxxxxxxxxx>,
"Michael S. Tsirkin" <mst@xxxxxxxxxx>,
"Gerd Hoffmann" <kraxel@xxxxxxxxxx>
```

It seems like the encoding process is being applied redundantly, causing
special characters like &lt; (for <) and &gt; (for >) to render
improperly. This double encoding affects both usability and
readability, especially when dealing with email threads that rely
heavily on clear headers for communication between contributors.

For reference, I have also attached a screenshot of the output, which
can be found here:

https://gist.github.com/ammarfaizi2/bbb1480822ece70cf2d261e876bd7ba2

It would be great if this could be resolved as soon as possible to
restore the proper display of inbox outputs.

Thank you for your attention to this matter!

--
Ammar Faizi