0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/spec/fixtures/emails/word_html_reply.eml
Régis Hanol 6f082bc7a4
FIX: Don't elide numbered lists from Word emails (#42103)
Previously, a reply sent from Outlook was truncated at its first
numbered list — `extract_from_word` treats any child of `.WordSection1`
that is neither a `<p>` nor a `<ul>` as the start of a signature or
forwarded message, and Outlook renders numbered lists as `<ol>`, so the
list and everything after it was elided and (outside of private
messages, or with `always_show_trimmed_content` disabled) dropped from
the post with no error.

This change excludes `<ol>` as well, so numbered lists are kept along
with the content that follows them, while the `<div>`/`<table>`
signature and forwarded-message blocks the method exists to strip are
still elided.
2026-07-28 21:29:10 +02:00

25 lines
783 B
Text
Vendored

Return-Path: <discourse@bar.com>
From: Foo Bar <discourse@bar.com>
To: reply+4f97315cc828096c9cb34c6f1a0d6fe8@bar.com
Date: Fri, 15 Jan 2017 00:12:43 +0100
Message-ID: <181@foo.bar.mail>
Mime-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div class="WordSection1">
<p class="MsoNormal">This is the <b>body</b> of the email.</p>
<ul>
<li>a bullet</li>
<li>another bullet</li>
</ul>
<p class="MsoNormal">And these are the steps to follow:</p>
<ol>
<li>a first step</li>
<li>a second step</li>
</ol>
<p class="MsoNormal">That's all folks!</p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal">This is the <i>elided</i> part!</p>
</div>
</div>