Merge pull request #1518 from sharelatex/jel-search-result-url

encodeURIComponent on wiki search result

GitOrigin-RevId: 87cb53784de691677a56a5e3fc139a35ad7ae941
This commit is contained in:
Jessica Lawshe 2019-02-14 12:07:44 -06:00 committed by sharelatex
parent c9eab36031
commit 429e392fbb

View file

@ -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, '_')