Skip to content

Public share of a .txt file does not word-wrap, even if word-wrap does work when viewing files from Nextcloud UI #8136

@gimulnautti

Description

@gimulnautti

Describe the bug
Public share of a .txt file does not follow how the text looks when logged in. When logged in the .txt is word-wrapped and easy to read. When sharing the same file publicly however, lines are not wrapped and the text becomes impossible to read without copy-pasting. This behaviour makes sharing simple .txt files for public purposes practically unusable.

To Reproduce
Steps to reproduce the behavior:

  1. Create or upload a .txt file with characters as rows
  2. Create public link to the .txt file
  3. Open the link on a browser not logged in to the nextcloud server
  4. See that text is not wrapped

Expected behavior
Text looks the same whether you view it within Nextcloud interface or the public share

Server details:

  • Nextcloud version: 31.0.10

Client details:

  • OS: macOS
  • Browser: Brave
  • Browser version:1.85.118
  • Device: desktop
Logs

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions