Update filter.php

Compatibility with MathJax (and mhchem extension)