mail icon indicating copy to clipboard operation
mail copied to clipboard

Plain text mail spaces are not shown correctly

Open virgo47 opened this issue 9 months ago • 0 comments

Steps to reproduce

  1. Send yourself a mail with simple plaintext content with subsequent spaces and indents - do not use Nextcloud Mail for it (see #10912), e.g.:
first   << more spaces
  second, indented
  1. Open the mail. The spaces will be ignored just as they are in HTML source.

Expected behavior

Spaces are visible, even if the plaintext is shown with non-monospace fonts as it currently is, the spaces should be preserved and shown. It should be possible to copy/paste them.

When I modified the displayed page with DevTools with white-space attribute, it looked much better for plain text content, so something in this effect would help a lot for plain text mails or plain text parts of multipart mails:

<div id="message-container" ... style="white-space: pre;">

Actual behavior

White spaces are lost by the HTML rendering. Leading spaces are gone, multiple spaces are shrinked to one.

Mail app version

4.2.6

Nextcloud version

31.0.1

Mailserver or service

Zimbra 8.x

Operating system

Ubuntu 24.04.2 LTS

PHP engine version

PHP 8.3

Nextcloud memory caching

No response

Web server

Apache (supported)

Database

PostgreSQL

Additional info

No response

virgo47 avatar Mar 20 '25 18:03 virgo47