Skip to content

Pasted code blocks and inline code should preserve all text characters #938

@dbolton

Description

@dbolton

Describe the bug
Nextcloud Text mangles pasted code blocks and inline code. It should preserve the original text instead of dropping characters or trying to parse it.

To Reproduce
Steps to reproduce the behavior:

  1. Select and copy the following text:

Code block:

2x = 2*x, 3(4) = 3*(4)
**Bold**
_Underline_
~~Strike through~~
`code`
https://example.com

Inline code: 2x = 2*x, 3(4) = 3*(4) **Bold** _Underline_ ~~Strike through~~ `code` https://example.com

  1. Open a markdown file in Nextcloud
  2. Paste

Actual behavior
Asterisks (*), underscores (_), tildes (~), and grave accents (`) are mistakenly dropped or parsed. URLs become clickable.

Expected behavior
The text within the code blocks should not be parsed at all. It should match the text display above. URLs should remain plain text.

Client details:

  • OS: Windows
  • Browser: Firefox (developer edition)
  • Version: 79
  • Device: Desktop
Server details

Text app version: 2.0.0

Operating system: Ubuntu

Web server: Nginx

Database: mysql

PHP version: 7.2.31

Nextcloud version: 18.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions