Skip to content

Additional newlines/spaces added to drafts #12190

@max65482

Description

@max65482

Steps to reproduce

  1. Write an email.
  2. Save it as draft.
  3. Reopen the draft.

Expected behavior

Draft is reopened unchanged.

Actual behavior

The reopened draft contains additional newlines/spaces. Each time the draft is saved, another newline/space pair is added.

Image

Mail app version

5.6.5

Nextcloud version

31.0.10

Mailserver or service

GMX

Operating system

Linux

PHP engine version

None

Nextcloud memory caching

No response

Web server

None

Database

None

Additional info

Looking into the solution, I suspect this regex to be guilty:

return html(text.value.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br>$2'))

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions