Skip to content

Commit

Permalink
fix: use replace instead of replaceAll to support pre-Node16
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Dec 6, 2021
1 parent 003ca51 commit 5173c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/helpers/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
rawPath = rawPath.replace(unsafeCharsRegex, '')
if (rawPath === '') { rawPath = 'home' }

rawPath = rawPath.replaceAll('\\', '').replaceAll('//', '').replaceAll(/\.\.+/ig, '')
rawPath = rawPath.replace(/\\/g, '').replace(/\/\//g, '').replace(/\.\.+/ig, '')

// Extract Info
let pathParts = _.filter(_.split(rawPath, '/'), p => {
Expand Down

0 comments on commit 5173c48

Please sign in to comment.