5
$\begingroup$

I've noticed that when a search query contains terms that are usually typeset in $\LaTeX$, the formatting in the Search Results page becomes messed up.

I'm assuming this issue occurs because the matching terms in the search results are encapsulated in a <span class="search-highlight"> which MathJx then has to try and 'format', since the span's html would then be part of the text enclosed between the $.

Here's an example when searching for x y:

Messed up search results

Other examples:

etc...

$\endgroup$
2
$\begingroup$

We no longer highlight titles in the results, so this issue has resolved itself.

Note: we can't reasonably format the bodies because the snippets are outside of our control, so those will remain portions of MathJax in some situations. That being said, if an entire delimited fragment is returned in the body it will be formatted with MathJax.

$\endgroup$
  • 1
    $\begingroup$ "we can't reasonably format the bodies because the snippets are outside of our control". I'm not sure of that. Any CMS or blog that has the intelligence to strip out some unwanted content (for example, some HTML or BBCode) in search result pages with excerpts. That an unmatched $ spoils the text is a bug. If it's too difficult to match dollar signs, could't at least escape them, so that the MathJax formatter is not involved and the latex code is shown instead? $\endgroup$ – leonbloy May 26 '14 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .