generated from Seekra/repository-template
feat(settings): filter characters that would cause a broken URL from settings page path
This commit is contained in:
@@ -20,7 +20,10 @@ export const normalizePagePath = function normalizePagePath (path) {
|
||||
return path
|
||||
.replace(/\.+/g, '.')
|
||||
.replace(/^\.+|\.+$/g, '')
|
||||
.split('.');
|
||||
.split('.')
|
||||
.map(
|
||||
(segment) => segment.replace(/[^a-zA-Z0-9-]/g, '')
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettingsPage = function useSettingsPage () {
|
||||
|
||||
Reference in New Issue
Block a user