Skip to:

How to strip formatting from auto emails

  • Jon Fergus


    When someone makes a reply to one of our topics, the automatic emails sent to subscribers of the topic contains style formatting that makes it very difficult to read.

    This is an example from a recent reply:

    <p class="MsoNormal">“The two schools of Buddha's doctrine, the esoteric and the exoteric, are respectively called the ‘Heart’ and the ‘Eye’ Doctrine. Bodhidharma called them in China — from whence the names reached Tibet — the <span style="font-family: 'Calibri','sans-serif';">Tsung-men</span> (esoteric) and <span style="font-family: 'Calibri','sans-serif';">Kiau-men</span> (exoteric school). It is so named, because it is the teaching which emanated from Gautama Buddha's <span style="font-family: 'Calibri','sans-serif';">heart</span>, whereas the ‘Eye’ Doctrine was the work of his head or brain. The ‘Heart Doctrine’ is also called ‘the seal of truth’ or the ‘true seal, a symbol found on the heading of almost all esoteric works.</p>
    <p class="MsoNormal">"Secret Heart" is the esoteric doctrine.</p>
    <p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; line-height: normal; mso-outline-level: 5;"><b><span style="font-size: 10.0pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';">H. P. Blavatsky, The Voice</span><i><span style="font-size: 10.0pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"> of the Silence</span></i></b><b><span style="font-size: 10.0pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';">, Fragment 11. The Two Paths. </span></b></p>
    <p class="MsoNormal"></p>
    Post Link:

    This happens when people copy/paste into their reply from another program (i.e. Word, etc.). How can we strip this formatting in the emails?

    Details: we’re using the TinyMCE editor for replies, with “Text” and “Visual” field options. If members paste into the “text” field and then switch to the “visual” field before posting, there’s no issue, as wordpress cleans the content itself. But if people paste into the visual field, the formatting remains and gets sent as part of the auto email.
    Also, we’re currently running bbpress 2.5.10 and WordPress 4.6.1.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Jon Fergus


    Just realized that this issue is actually a bit different than I stated above. When an admin or keymaster on our site copy/pastes into a reply to a topic, the reply formats properly. When a regular member (contributor or participant) copy/pastes the exact same thing, the formatting shows up *both* in the reply itself on the topic and in the notification email. See here:

    identical copy/paste reply by keymaster and participant

    So then, of course, the notification email from the participant member includes the formatting marks as well. So the issue is actually somewhere between pasting into the “visual” button of the reply form and bbpress posting the reply after the member clicks “submit”.

    Jon Fergus


Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar