diff --git a/src/components/InteractiveIndex.tsx b/src/components/InteractiveIndex.tsx index 4ecc3da..c9f3b9e 100644 --- a/src/components/InteractiveIndex.tsx +++ b/src/components/InteractiveIndex.tsx @@ -243,6 +243,15 @@ const allInteractives: Interactive[] = [ path: '/themes/games/craps-game', theme: 'Games', dateAdded: '2025-01-05' + }, + { + id: 'neighbor-sum-avoidance', + title: 'Neighbor Sum Avoidance', + description: 'Arrange numbers in a circle so that the sum of two neighbors is never divisible by 3, 5, or 7. An interactive graph theory puzzle!', + tags: ['graph-theory', 'puzzle', 'arrangement', 'divisibility', 'circle', 'mathematics'], + path: '/themes/discrete-math/graphs/neighbor-sum-avoidance', + theme: 'Discrete Math', + dateAdded: '2025-01-22' } ]; diff --git a/src/utils/security.ts b/src/utils/security.ts index a8bb895..7ec7d66 100644 --- a/src/utils/security.ts +++ b/src/utils/security.ts @@ -30,8 +30,8 @@ export const sanitizeUrl = (url: string): string => { try { const urlObj = new URL(url); - // Remove any potentially harmful query parameters - const cleanUrl = `${urlObj.protocol}//${urlObj.host}${urlObj.pathname}`; + // Keep the full URL including pathname, search, and hash for proper routing + const cleanUrl = `${urlObj.protocol}//${urlObj.host}${urlObj.pathname}${urlObj.search}${urlObj.hash}`; return cleanUrl; } catch { return window.location.href;