Skip to content

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

Closed

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

Activity

  1. added
    bug
    on Jul 21, 2020
  2. luka-nextcloud commented on Oct 28, 2022

    @luka-nextcloud
    Contributor

    I cannot reproduce the bug. Please feel free to reopen the issue if you are still able to see the bug on the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugformat: markdown

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions