Skip to content
This repository was archived by the owner on Sep 15, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ function getFileFullPath(fileName: string, cacheFolderPath: string): string {
* @returns {string} The modified string representing the file name obtained by replacing '/' characters with '__'.
*/
function convertRouteToFileName(route: string): string {
// replace all occurrences of '/' character in the 'route' string with '__' using regular expression
return route.replace(new RegExp('/', 'g'), '__');
// replace all special characters in the 'route' string with '__' using regular expression
return route.replace(new RegExp('[^\w\d-]', 'g'), '__');
}

/**
Expand Down