quickfix for issue #1461

Fixes #1461.
Should be simplified as: 
```py
if child.tag == 'span' and 'math' in child.get('class', []):
```