Skip to content

Commit 9a6653b

Browse files
committed
make sure that we only encode parts of premberurls
1 parent 63f22bc commit 9a6653b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

prember-urls.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ 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(
72+
`/${p}/${uniqVersion}/${entity}/${partialUrlEncode(cleanId)}`
73+
);
7274

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

107109
listOfFunctions.forEach((func) => {
108110
urls.push(
109-
`/${p}/${uniqVersion}/functions/${func.class}/${func.name}`
111+
`/${p}/${uniqVersion}/functions/${encodeURIComponent(
112+
func.class
113+
)}/${func.name}`
110114
);
111115
});
112116
});

0 commit comments

Comments
 (0)