preserves math formula for use with MathJax (bug reported by Elvis)
fixes a bug in Javascript progressive enhancement (bug reported by Elvis)