Skip to content

Commit d53951a

Browse files
committed
make sure that we only encode parts of premberurls
1 parent e770e10 commit d53951a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

prember-urls.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = function () {
6868
// add classes
6969
revIndex.data.relationships[entity].data.forEach(({ id }) => {
7070
const [, cleanId] = id.match(/^.+-\d+\.\d+\.\d+-(.*)/);
71-
urls.push(`/${p}/${uniqVersion}/${entity}/${cleanId}`);
71+
urls.push(`/${p}/${uniqVersion}/${entity}/${partialUrlEncode(cleanId)}`);
7272

7373
// TODO only include sub routes if that entity has stuff in that route i.e. if it's empty don't pre-render it
7474
urls.push(
@@ -106,7 +106,9 @@ module.exports = function () {
106106

107107
listOfFunctions.forEach((func) => {
108108
urls.push(
109-
`/${p}/${uniqVersion}/functions/${func.class}/${func.name}`
109+
`/${p}/${uniqVersion}/functions/${encodeURIComponent(
110+
func.class
111+
)}/${func.name}`
110112
);
111113
});
112114
});

0 commit comments

Comments
 (0)