Browse Source

fix: use replace instead of replaceAll to support pre-Node16

pull/4789/head 2.5.255
NGPixel 2 years ago
parent
commit
5173c4802e
No known key found for this signature in database GPG Key ID: 8FDA2F1757F60D63
1 changed files with 1 additions and 1 deletions
  1. 2
      server/helpers/page.js

2
server/helpers/page.js

@ -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 => {

Loading…
Cancel
Save