Skip to content

Commit 514e419

Browse files
authored
Merge pull request #1137 from isaacphysics/bug/sanitise-hex-id
Sanitise hexagon board IDs
2 parents 73f8794 + 624a217 commit 514e419

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/components/elements/cards/BoardCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const BoardCard = ({user, board, boardView, assignees, toggleAssignModal,
141141
// Decides whether we show the "Assign/Unassign" button, along with other "Set Assignments"-specific stuff
142142
const isSetAssignments = isDefined(toggleAssignModal) && isDefined(assignees);
143143

144-
const hexagonId = `board-hex-${board.id}`;
144+
const hexagonId = (`board-hex-${board.id}`).replace(/[^a-z0-9-]+/gi, '');
145145
const boardLink = isSetAssignments ? `/assignment/${board.id}` : `${PATHS.GAMEBOARD}#${board.id}`;
146146
const hasAssignedGroups = assignees && assignees.length > 0;
147147

0 commit comments

Comments
 (0)