nextcloud / nextcloud/text

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

Open
#8,136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: sharing
Dominant language
JavaScript
Stars
659
Forks
133
Avg merge
1d 20h
Merged PRs (30d)
110

Description

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) ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by opening a publicly shared .txt file in a logged-out browser, then compare it with the same file in the Nextcloud UI. Trace the public-share rendering path and identify why long lines are not wrapped; done means the public view wraps text consistently with the logged-in view.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.