This bug caught us a little.

Current code:

    case 'process':
      switch ($delta) {
        case 0:
          return messaging_html_to_text($text);
        case 1:
          return messaging_check_plain($text);
        default:
          return $text;
      }

What it should be:

switch ($delta) {
        case 0:
          return messaging_check_plain($text);
        case 1:
          return messaging_html_to_text($text);
        default:
          return $text;
      }

We enabled the html_to_text module the other day, and our notifications got a little muddled. The html_to_text filter suddenly decided to apply itself to our emails. It turns out that the final process delta is incorrect, and so, when we had asked for plain text (our only option without the html_to_text module), we got everything processed - and most of our new lines removed.

The issue goes unnoticed without html_to_text because the messaging_html_to_text function checks that the module is installed, and if not, just calls check plain anyway. However, enabling the module means that this filter suddenly does new things.

Pretty simple to fix. I have not supplied a patch because we are not currently on the latest version of the module, but the issue persists, so this should be easy enough to apply.

Comments

jose reyero’s picture

Status: Active » Fixed

Yup, you're right. Fixed (5.x and 6.x), thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.