MDL-65394 filter: only do mathjax parsing on strings that need it