Public share of a .txt file does not word-wrap, even if word-wrap does work when viewing files from Nextcloud UI
Nobody has claimed this yet.
- 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:
- Create or upload a .txt file with characters as rows
- Create public link to the .txt file
- Open the link on a browser not logged in to the nextcloud server
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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