-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths #4947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reamer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong place. Please execute the URLDecode closer to the request/response code, maybe also in the websocket part
Background: There are more NotebookRepos then VFSNotebookRepo.
|
Hi Reamer, thanks for the review. Just a thought, the need for decoding here might stem from the use of Curious to hear your thoughts. |
|
Javadoc of Maybe it was a bug in vfs library. Do you have access to a Windows machine to validate the behaviour of the workaround with I would like to get rid of the workaround. |
I thought the method calls go to a Java native object. But here the vfs library is used. Therefore it must be corrected at this point. |
|
@Reamer Interestingly, if I create a new notebook before restarting, the space is displayed properly. But after restarting, even that notebook shows %20 instead of spaces. To fix this, I modified the NoteInfo.java file located at zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java. What do you think about this approach? |
|
Very strange. Which NotebookRepo and which Zeppelin version are you using? I have never seen %20 in the name of Zeppelin Notes. I have never seen %20 in the name of Zeppelin Notes. |
|
@Reamer |
|
@ParkGyeongTae After checking with the dubugger, I found that the reason why the path of a newly created note after startup appears correctly is because the |
|
@tbonelee |
|
Yes, I'm seeing the same. The paths are shown in the URI encoded format as well. |
78715d2 to
d9abfda
Compare
|
@ParkGyeongTae Sorry, for the late response. |
…implify path handling
|
@Reamer |
Which platform did you use? |
|
@Reamer |
|
It's good to hear that it works on MacOS. I would be interested to know whether it also works on Windows. As far as I know, Windows itself is not supported by Zeppelin, but we shouldn't break any functions. |
|
I checked this on my old Windows laptop, and the latest revision breaks the
If we try to fix this by setting To fix the URL-encoded path issue without breaking things on Windows, we should ensure:
|
|
@tbonelee It makes sense now that directly replacing Given that, what do you think about keeping Original code: String noteFileName = fileObject.getName().getURI().replace("file:///", "/");Proposed changed: String noteFileName = URLDecoder.decode(
fileObject.getName().getURI(), StandardCharsets.UTF_8
).replace("file:///", "/");This might fix the encoded path issue without affecting the drive letter or breaking things on Windows. Would love to hear your thoughts! |
|
Thank you for recreating the behavior on Windows. Making a major code change here would be going too far. We can therefore take the workaround via the URL decoder. |
Reamer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no further comments are received, I will merge the pull request into master and branch-0.12.
… file paths ### What is this PR for? This PR fixes a UI bug where notebook and folder names that contain spaces are displayed with the URL-encoded text %20 in the notebook tree (e.g., Flink%20Tutorial). We now URL-decode the VFS path and keep the existing Windows-specific prefix handling, so names with spaces render correctly across all platforms. ### What type of PR is it? Bug Fix ### Todos * [x] - Add URL-decode logic in path normalisation ### What is the Jira issue? * Jira: https://issues.apache.org/jira/browse/ZEPPELIN/ZEPPELIN-6202 ### How should this be tested? * Build this branch and start Zeppelin. * Create or import a notebook whose name contains a space (e.g., “Python Tutorial”). ### Screenshots (if appropriate) Before  After  ### Questions: * Does the license files need to update? No. * Is there breaking changes for older versions? No. * Does this needs documentation? No. Closes #4947 from ParkGyeongTae/ZEPPELIN-6202. Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com> (cherry picked from commit 890ddfe) Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
|
Merged into master and branch-0.12 |



What is this PR for?
This PR fixes a UI bug where notebook and folder names that contain spaces are displayed with the URL-encoded text %20 in the notebook tree (e.g., Flink%20Tutorial).
We now URL-decode the VFS path and keep the existing Windows-specific prefix handling, so names with spaces render correctly across all platforms.
What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
How should this be tested?
Screenshots (if appropriate)
Before


After
Questions: