Skip to content

Commit 89f9c6c

Browse files
rodrigo-sobraldiocas
authored andcommitted
swancustomenvironments: Avoid the use of ../ on the specified file value
1 parent c040d5f commit 89f9c6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwanCustomEnvironments/swancustomenvironments/templates/customenvs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
let has_failed = false, project_path = '/';
7272

7373
const urlParams = new URLSearchParams(window.location.search);
74-
const file = `/${urlParams.get('file') || ""}`;
74+
const file = `/${urlParams.get('file') || ""}`.replace(/\.\.\//g, '').replace(/\.\.\\/g, '');
7575

7676
// Scroll to the output-box height
7777
outputBox.scrollIntoView({

0 commit comments

Comments
 (0)