diff --git a/services/web/public/src/main/learn.js b/services/web/public/src/main/learn.js index f87a3c54c9..b32f8e4dca 100644 --- a/services/web/public/src/main/learn.js +++ b/services/web/public/src/main/learn.js @@ -43,7 +43,7 @@ define(['base', 'directives/mathjax', 'services/algolia-search'], function( const buildHitViewModel = function(hit) { const pagePath = hit.kb ? 'how-to/' : 'latex/' - const pageSlug = hit.pageName.replace(/\s/g, '_').replace(/\?/g, '%3F') + const pageSlug = encodeURIComponent(hit.pageName.replace(/\s/g, '_')) let section_underscored = '' if (hit.sectionName && hit.sectionName !== '') { section_underscored = '#' + hit.sectionName.replace(/\s/g, '_')