Commit 78adcfd
fix: encode hash character in app route URLs to prevent truncation (#3075)
* fix: encode hash character in file paths for app URLs
Files and folders containing hash characters (#) in their names were causing
issues when opened in apps (text-editor, preview) because the browser treats
# as a URL fragment identifier, truncating the URL.
Changes:
- Import and use encodePath in useFileActions to encode path segments
- Encode hash characters segment-wise in getEditorRouteOpts()
- Build URLs manually in useFileActionsOpenWithApp and SaveAsModal to avoid
double encoding from router.resolve()
- Add unit tests to verify correct encoding behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* format
* react to code review
* fix: opening document from inside collabora
* cleanup
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jannik Stehle <j.stehle@opencloud.eu>1 parent 1a8bef3 commit 78adcfd
2 files changed
Lines changed: 42 additions & 3 deletions
File tree
- packages/web-pkg
- src/composables/actions/files
- tests/unit/composables/actions/files
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
| 187 | + | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 | | |
107 | | - | |
| 112 | + | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
112 | 151 | | |
113 | 152 | | |
114 | 153 | | |
| |||
0 commit comments