Fix html content access#1317
Merged
RohitKushvaha01 merged 3 commits intoAcode-Foundation:mainfrom May 20, 2025
RohitKushvaha01:fix-html-css-js
Merged
Fix html content access#1317RohitKushvaha01 merged 3 commits intoAcode-Foundation:mainfrom RohitKushvaha01:fix-html-css-js
RohitKushvaha01 merged 3 commits intoAcode-Foundation:mainfrom
RohitKushvaha01:fix-html-css-js
Conversation
Member
For case 2, It's about detecting the parent directory of the file(opened the html file) and limiting the access to it? |
bajrangCoder
approved these changes
May 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: If your HTML file is not inside an opened project folder, it can only access files in the same folder or below it not outside.
For example:
/sdcard/HelloWorld/html/index.html✅ Case 1: You open
/sdcard/HelloWorldas the project folderNow the HTML file can access:
/sdcard/HelloWorld/css/style.css/sdcard/HelloWorld/images/logo.png/sdcard/HelloWorld/html/scripts/app.jsBut it cannot access:
/sdcard/AnotherFolder/data.json(because it's outside the project root)
❌ Case 2: No folder is opened in the sidebar or a different folder is opened (just the HTML file)
Now the root becomes
/sdcard/HelloWorld/html, so the HTML file can only access:/sdcard/HelloWorld/html/scripts/app.js/sdcard/HelloWorld/html/images/logo.pngIt cannot access:
/sdcard/HelloWorld/css/style.css(because it’s outside
/sdcard/HelloWorld/html)