Postorius not HTML-decoding < to "<" characters
Andy Smith wrote on 2024-10-30 20:59:
# Block access to the signup form from Tor exit nodes. <Location /mailman/accounts/signup> <RequireAll> Require all granted Include /etc/apache2/tor-exit-list.conf </RequireAll> </Location>
If we look at the above message, there are less-than and greater-than symbols around the Apache keywords in the email as expected.
If we look at the archived version of the message, we see a slightly mangled representation:
# Block access to the signup form from Tor exit nodes. <Location /mailman/accounts/signup> <RequireAll> Require all granted Include /etc/apache2/tor-exit-list.conf </RequireAll> </Location>
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
Hopefully I've assigned the blame to Postorius accurately and no formatting nor archiving issues make the issue difficult to understand.
Thanks.
On 11/9/24 12:24, Ron / BCLUG wrote:
Hopefully I've assigned the blame to Postorius accurately and no formatting nor archiving issues make the issue difficult to understand.
This is a HyperKitty issue. Postorius has nothing to do with archiving.
Also, it depends on the archive rendering mode and only occurs if the
mode is Markdown text rather than Plain text. It is really mistune
,
<https://mistune.lepture.com/en/latest/index.html>, which is doing the
markdown rendering and which escapes
HTML tags.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 2024-11-09 13:05:16 -0800 (-0800), Mark Sapiro wrote: [...]
Also, it depends on the archive rendering mode and only occurs if the mode is Markdown text rather than Plain text. It is really
mistune
, <https://mistune.lepture.com/en/latest/index.html>, which is doing the markdown rendering and whichescapes
HTML tags. [...]
On a related note, the MD rendering here seems to misinterpret sig separators as markup. Like this...
Jeremy Stanley
Mark Sapiro wrote on 2024-11-09 13:05:
This is a HyperKitty issue.
Ah, I see, I thought it'd be on the display process.
Does that mean the DB has data with mismatched tags in it?
If so, will that require a query to fix?
Interestingly, the quoted part of my message has < where my message has proper less-than and greater-than for the Apache tags.
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
It's inconsistent with the archive rendering mode at lists.mailman3.org.
I haven't currently got an instance that I can test on but will keep this in mind when the time comes to migrate.
Should the rendering at lists.mailman3.org get modified, please share the procedure.
Testing: less-than and greater-than around a tag:
<Location /mailman/accounts/signup>
Testing: less-than and greater-than around a tag in a quoted block:
<Location /mailman/accounts/signup>
Does that mean the DB has data with mismatched tags in it?
The database has exactly what list members receive by email. What we are talking about is how this is rendered in HyperKitty.
Interestingly, the quoted part of my message has < where my message has proper less-than and greater-than for the Apache tags.
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
It's inconsistent with the archive rendering mode at lists.mailman3.org.
Here's what's going on. In normal text, mistune disables HTML tags by
converting <
to the html entity <
, but your browser renders the
HTML entity <
as <
so you see what was written.
The issue here is the text you quoted was originally in a markdown code
block, i.e. preceded and followed by lines of three backticks. Code
blocks are intended to be seen literally as written so they are wrapped
in <pre><code> ... </code></pre> tags in the HTML and also HTML escaped.
The problem is the tag disabling converts <
to <
but then the
HTML escaping converts <
to &lt;
which your browser then
renders as <
rather than <
.
(aside, it will be interesting to see how that is rendered in the archive)
If HyperKitty is set to render as plain text rather than markdown it doesn't interpret code blocks so this doesn't happen. There are other anomalies with the markdown rendering, e.g., as pointed out by Jeremy at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
Those notwithstanding, we prefer markdown rendering for this list
because often people post Python snippets or mailman shell
interactions and enclosing those in markdown code blocks renders them
much better.
I haven't currently got an instance that I can test on but will keep this in mind when the time comes to migrate.
Should the rendering at lists.mailman3.org get modified, please share the procedure.
Testing: less-than and greater-than around a tag:
<Location /mailman/accounts/signup>
Testing: less-than and greater-than around a tag in a quoted block:
<Location /mailman/accounts/signup>
Both the above tests look fine in the archive.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 11/9/24 17:09, Mark Sapiro wrote:
Here's what's going on. In normal text, mistune disables HTML tags by converting
<
to the html entity<
, but your browser renders the HTML entity<
as<
so you see what was written.The issue here is the text you quoted was originally in a markdown code block, i.e. preceded and followed by lines of three backticks. Code blocks are intended to be seen literally as written so they are wrapped in <pre><code> ... </code></pre> tags in the HTML and also HTML escaped. The problem is the tag disabling converts
<
to<
but then the HTML escaping converts<
to&lt;
which your browser then renders as<
rather than<
.(aside, it will be interesting to see how that is rendered in the archive)
The backtick quoting causes the < to be rendered as <
Here are the
above two paragraphs written in a way (removing the backticks from
around <) that I hope will render as I intended.
Here's what's going on. In normal text, mistune disables HTML tags by
converting < to the html entity <
, but your browser renders the
HTML entity <
as < so you see what was written.
The issue here is the text you quoted was originally in a markdown code
block, i.e. preceded and followed by lines of three backticks. Code
blocks are intended to be seen literally as written so they are wrapped
in <pre><code> ... </code></pre> tags in the HTML and also HTML escaped.
The problem is the tag disabling converts < to <
but then the HTML
escaping converts <
to &lt;
which your browser then renders
as <
rather than <.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Jeremy Stanley
-
Mark Sapiro
-
Ron / BCLUG